def testPipelineIterator(self): strings = ['abcdefg', 'helloworld!', 'qwerty'] result = pipeline.load_pipeline(MockPipeline(), iter(strings)) self.assertEqual( set([MockStringProto(s + '_A') for s in strings] + [MockStringProto(s + '_B') for s in strings]), set(result['dataset_1'])) self.assertEqual(set(MockStringProto(s + '_C') for s in strings), set(result['dataset_2']))
def testPipelineIterator(self): strings = ['abcdefg', 'helloworld!', 'qwerty'] result = pipeline.load_pipeline(MockPipeline(), iter(strings)) self.assertEqual( set([MockStringProto(s + '_A') for s in strings] + [MockStringProto(s + '_B') for s in strings]), set(result['dataset_1'])) self.assertEqual( set([MockStringProto(s + '_C') for s in strings]), set(result['dataset_2']))