Example #1
0
    def test_rshift(self):
        comp = Composition(ints_less_than) >> product

        self.assertEqual(
            [
                (ints_less_than, False),
                (product, True)
            ],
            comp._flattened()
        )
Example #2
0
    def test_gt(self):
        comp = Composition(add_one) > add_two

        self.assertEqual(
            [
                (add_one, False),
                (add_two, False)
            ],
            comp._flattened()
        )
Example #3
0
    def test_rshift(self):
        comp = Composition(ints_less_than) >> product

        self.assertEqual([(ints_less_than, False), (product, True)],
                         comp._flattened())
Example #4
0
    def test_gt(self):
        comp = Composition(add_one) > add_two

        self.assertEqual([(add_one, False), (add_two, False)],
                         comp._flattened())