issue #477: old Py zlib did not include extended exception text.

This commit is contained in:
David Wilson 2019-01-23 12:44:08 +00:00
parent b831b4ab31
commit 9248b6d2b6
1 changed files with 12 additions and 9 deletions

View File

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