Beispiel #1
0
    def test_flush_dataIsNone_error(self):
        pipeline = Pipeline([identity])

        with self.assertRaises(AssertionError):
            pipeline.flush(None)
Beispiel #2
0
    def test_flush_initial_value(self):
        pipeline = Pipeline([identity, add_testpipe])

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

        self.assertEqual(pipeline.flush(self.data), self.data)
Beispiel #4
0
    def test_flush_pipes_and_functions(self):
        pipeline = Pipeline([IdentityPipe(), identity])

        self.assertEqual(pipeline.flush(self.data), self.data)
Beispiel #5
0
    def test_flush_pipes(self):
        pipeline = Pipeline([IdentityPipe()])

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