def testGroupingCumulative(self):

        period = self.period
        period.group(cumulative=True)

        assertTrue = self.assertTrue
        assertEqual = self.assertEqual

        # Check rows
        expected_rows = {"A": ((1, 2, 7, 8), (13,)),
                         "B": ((3, 4, 9, 10), (14,)),
                         "C": ((5, 6, 11, 12), (15,16)),
                         }
        rows = period._rows
        assertEqual(set(rows.keys()), set(expected_rows.keys()))
        for k, v in rows.items():
            expected_current = set(expected_rows.get(k)[0])
            assertEqual(v[0], expected_current,
                        msg = "Row %s current events: %s != %s" %
                              (k, v[0], expected_current))
            expected_previous = set(expected_rows.get(k)[1])
            assertEqual(v[1], expected_previous,
                        msg = "Row %s previous events: %s != %s" %
                              (k, v[1], expected_previous))

        # Check columns
        expected_cols = {1: ((1, 5, 7, 11), (15,)),
                         2: ((2, 3, 6, 8, 9), (14,)),
                         3: ((4, 10, 12), (13, 16)),
                         }
        cols = period._cols
        assertEqual(set(cols.keys()), set(expected_cols.keys()))
        for k, v in cols.items():
            expected_current = set(expected_cols.get(k)[0])
            assertEqual(v[0], expected_current,
                        msg = "Row %s current events: %s != %s" %
                              (k, v[0], expected_current))
            expected_previous = set(expected_cols.get(k)[1])
            assertEqual(v[1], expected_previous,
                        msg = "Row %s previous events: %s != %s" %
                              (k, v[1], expected_previous))

        # Check matrix
        expected_matrix = {("A", 1): ((1, 7), ()),
                           ("A", 2): ((2, 8), ()),
                           ("A", 3): ((), (13,)),
                           #("B", 1): (empty),
                           ("B", 2): ((3, 9), (14,)),
                           ("B", 3): ((4, 10), ()),
                           ("C", 1): ((5, 11), (15,)),
                           ("C", 2): ((6,), ()),
                           ("C", 3): ((12,), (16,)),
                           }
        matrix = period._matrix
        assertEqual(set(matrix.keys()), set(expected_matrix.keys()))
        for k, v in matrix.items():
            expected_current = set(expected_matrix.get(k)[0])
            assertEqual(v[0], expected_current,
                        msg = "Row %s current events: %s != %s" %
                              (k, v[0], expected_current))
            expected_previous = set(expected_matrix.get(k)[1])
            assertEqual(v[1], expected_previous,
                        msg = "Row %s previous events: %s != %s" %
                              (k, v[1], expected_previous))

    # -------------------------------------------------------------------------
Write out the Actions, Rules, and Copies steps.  Return a path
dataset/ETHPy150Open sahana/eden/modules/unit_tests/s3/s3timeplot.py/PeriodTests.testGroupingCumulative--crossover with--dataset/ETHPy150Open adobe/brackets-shell/gyp/pylib/gyp/generator/ninja.py/NinjaWriter.WriteActionsRulesCopies