|
|
@ -30,15 +30,18 @@ class CommandLineTest(testlib.RouterMixin, testlib.TestCase):
|
|
|
|
# success.
|
|
|
|
# success.
|
|
|
|
|
|
|
|
|
|
|
|
fp = open("/dev/null", "r")
|
|
|
|
fp = open("/dev/null", "r")
|
|
|
|
proc = subprocess.Popen(args,
|
|
|
|
try:
|
|
|
|
stdin=fp,
|
|
|
|
proc = subprocess.Popen(args,
|
|
|
|
stdout=subprocess.PIPE,
|
|
|
|
stdin=fp,
|
|
|
|
stderr=subprocess.PIPE,
|
|
|
|
stdout=subprocess.PIPE,
|
|
|
|
)
|
|
|
|
stderr=subprocess.PIPE,
|
|
|
|
stdout, stderr = proc.communicate()
|
|
|
|
)
|
|
|
|
self.assertEquals(0, proc.returncode)
|
|
|
|
stdout, stderr = proc.communicate()
|
|
|
|
self.assertEquals(mitogen.parent.Stream.EC0_MARKER, stdout)
|
|
|
|
self.assertEquals(0, proc.returncode)
|
|
|
|
self.assertIn(b("Error -5 while decompressing data: incomplete or truncated stream"), stderr)
|
|
|
|
self.assertEquals(mitogen.parent.Stream.EC0_MARKER, stdout)
|
|
|
|
|
|
|
|
self.assertIn(b("Error -5 while decompressing data"), stderr)
|
|
|
|
|
|
|
|
finally:
|
|
|
|
|
|
|
|
fp.close()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
if __name__ == '__main__':
|
|
|
|