コード例 #1
0
    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']))
コード例 #2
0
ファイル: pipeline_test.py プロジェクト: Alice-ren/magenta
  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']))