コード例 #1
0
ファイル: test.py プロジェクト: alex2/vorlauf
 def test_pipeline_add_order(self):
     process1 = Process('first')
     process2 = Process('second')
     pipeline = Pipeline()
     pipeline.add(process1)
     pipeline.add(process2)
     self.assertEqual(pipeline.pipeline, [process1, process2])
コード例 #2
0
ファイル: test.py プロジェクト: alex2/vorlauf
    def test_pipeline_single_process_large_stream(self):
        with open(words_file) as fd:
            pipeline = Pipeline()
            pipeline.add(Process('cat', words_file))
            pipeline.run(stdin=fd, stdout=self.stdout)

        self.assertEqual(
            self.file_length(words_file),
            self.file_length(self.stdout_path)
        )
コード例 #3
0
ファイル: test.py プロジェクト: alex2/vorlauf
 def test_pipeline_add(self):
     process = Process('cat', 'foo')
     pipeline = Pipeline()
     pipeline.add(process)
     self.assertEqual(pipeline.pipeline, [process])