def test_flush_dataIsNone_error(self): pipeline = Pipeline([identity]) with self.assertRaises(AssertionError): pipeline.flush(None)
def test_flush_initial_value(self): pipeline = Pipeline([identity, add_testpipe]) self.assertEqual(pipeline.flush(self.data), list(range(11))[1:])
def test_flush_functions(self): pipeline = Pipeline([identity]) self.assertEqual(pipeline.flush(self.data), self.data)
def test_flush_pipes_and_functions(self): pipeline = Pipeline([IdentityPipe(), identity]) self.assertEqual(pipeline.flush(self.data), self.data)
def test_flush_pipes(self): pipeline = Pipeline([IdentityPipe()]) self.assertEqual(pipeline.flush(self.data), self.data)