コード例 #1
0
 def run():
     p1 = InputPipeProcessWrapper(["bash", "/tmp/luigi_test_sigpipe.sh"])
     counter = 1
     for line in p1:
         self.assertEqual(line, "Welcome %i times\n" % counter)
         counter += 1
     p1.close()
コード例 #2
0
ファイル: test_sigpipe.py プロジェクト: RUNDSP/luigi
 def run():
     p1 = InputPipeProcessWrapper(["bash", "/tmp/luigi_test_sigpipe.sh"])
     counter = 1
     for line in p1:
         self.assertEqual(line, "Welcome %i times\n" % counter)
         counter += 1
     p1.close()
コード例 #3
0
 def test_full_read(self):
     p1 = InputPipeProcessWrapper(["bash", "/tmp/luigi_test_sigpipe.sh"])
     counter = 1
     for line in p1:
         self.assertEqual(line, "Welcome %i times\n" % counter)
         counter += 1
     p1.close()
     self.assertFalse(os.path.exists("/tmp/luigi_sigpipe.marker"))
コード例 #4
0
ファイル: test_sigpipe.py プロジェクト: RUNDSP/luigi
 def test_full_read(self):
     p1 = InputPipeProcessWrapper(["bash", "/tmp/luigi_test_sigpipe.sh"])
     counter = 1
     for line in p1:
         self.assertEqual(line, "Welcome %i times\n" % counter)
         counter += 1
     p1.close()
     self.assertFalse(os.path.exists("/tmp/luigi_sigpipe.marker"))
コード例 #5
0
 def test_partial_read(self):
     p1 = InputPipeProcessWrapper(["bash", "/tmp/luigi_test_sigpipe.sh"])
     self.assertEqual(p1.readline(), "Welcome 1 times\n")
     p1.close()
     self.assertTrue(os.path.exists("/tmp/luigi_sigpipe.marker"))
コード例 #6
0
ファイル: test_sigpipe.py プロジェクト: RUNDSP/luigi
 def test_partial_read(self):
     p1 = InputPipeProcessWrapper(["bash", "/tmp/luigi_test_sigpipe.sh"])
     self.assertEqual(p1.readline(), "Welcome 1 times\n")
     p1.close()
     self.assertTrue(os.path.exists("/tmp/luigi_sigpipe.marker"))