Beispiel #1
0
 def test_clean(self):
     stream = RunnerStream(Runner())
     stream.clean()
Beispiel #2
0
 def test_runner_stream(self):
     self.assertIsInstance(make_stream(Runner()), RunnerStream)
Beispiel #3
0
 def test_creation(self):
     RunnerStream(Runner())
Beispiel #4
0
 def test_begin(self):
     stream = RunnerStream(Runner())
     self.assertEqual(stream.begin(), (None, subprocess.PIPE))
Beispiel #5
0
 def test_run(self):
     collector = Collector()
     runner = Runner(collector, collector)
     self.assertEqual(runner.run(['printf', 'xxx\\nyyy\\nzzz']), 0)
     self.assertEqual(collector.items, ['xxx', 'yyy', 'zzz'])
Beispiel #6
0
 def test_creation_not_implemented(self):
     runner = Runner()
     self.assertRaises(NotImplementedError, Streams, stdout=runner)
     self.assertRaises(NotImplementedError, Streams, stderr=runner)
Beispiel #7
0
 def test_creation_default(self):
     Runner()
Beispiel #8
0
 def test_run(self):
     collector = Collector()
     runner = Runner(collector, collector)
     self.assertEqual(runner.run(['printf', 'xxx\\nyyy\\nzzz']), 0)
     self.assertEqual(collector.items, ['xxx', 'yyy', 'zzz'])
Beispiel #9
0
 def test_creation_environment(self):
     Runner(Null, Null, {'PATH': '/home'})