Пример #1
0
    def test_flush_dataIsNone_error(self):
        pipeline = Pipeline([identity])

        with self.assertRaises(AssertionError):
            pipeline.flush(None)
Пример #2
0
    def test_flush_initial_value(self):
        pipeline = Pipeline([identity, add_testpipe])

        self.assertEqual(pipeline.flush(self.data), list(range(11))[1:])
Пример #3
0
    def test_flush_functions(self):
        pipeline = Pipeline([identity])

        self.assertEqual(pipeline.flush(self.data), self.data)
Пример #4
0
    def test_flush_pipes_and_functions(self):
        pipeline = Pipeline([IdentityPipe(), identity])

        self.assertEqual(pipeline.flush(self.data), self.data)
Пример #5
0
    def test_flush_pipes(self):
        pipeline = Pipeline([IdentityPipe()])

        self.assertEqual(pipeline.flush(self.data), self.data)