From 680f5d18c9c8c84586efb1e627aa83fbcce1218e Mon Sep 17 00:00:00 2001 From: Guido Draheim Date: Sun, 16 Sep 2018 20:47:53 +0200 Subject: [PATCH] adjust result sizes of zziptests --- test/zziptests.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/test/zziptests.py b/test/zziptests.py index 6ce9974..f13abd3 100644 --- a/test/zziptests.py +++ b/test/zziptests.py @@ -3014,7 +3014,7 @@ class ZZipTest(unittest.TestCase): download_raw(file_url, filename, tmpdir) exe = self.bins("unzip") run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()), - returncodes = [0, 80]) + returncodes = [3]) self.assertIn("missing 18 bytes in zipfile", run.errors) self.assertLess(len(run.output), 200) self.assertLess(len(errors(run.errors)), 800) @@ -3052,14 +3052,18 @@ class ZZipTest(unittest.TestCase): download_raw(file_url, filename, tmpdir) exe = self.bins("unzip") run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()), - returncodes = [0, 80]) + returncodes = [3]) self.assertIn("missing 18 bytes in zipfile", run.errors) - self.assertLess(len(run.output), 200) + self.assertGreater(len(run.output), 30) + self.assertGreater(len(errors(run.errors)), 1) + self.assertLess(len(run.output), 500) self.assertLess(len(errors(run.errors)), 800) # run = shell("cd {tmpdir} && {exe} -o {filename}".format(**locals()), returncodes = [3]) - self.assertLess(len(run.output), 200) + self.assertGreater(len(run.output), 30) + self.assertGreater(len(errors(run.errors)), 1) + self.assertLess(len(run.output), 400) self.assertLess(len(errors(run.errors)), 800) self.assertIn("missing 18 bytes in zipfile", run.errors) self.assertIn('expected central file header signature not found', run.errors) @@ -3379,14 +3383,18 @@ class ZZipTest(unittest.TestCase): download_raw(file_url, filename, tmpdir) exe = self.bins("unzip") run = shell("{exe} -l {tmpdir}/{filename} ".format(**locals()), - returncodes = [0, 80]) + returncodes = [3]) self.assertIn("missing 21 bytes in zipfile", run.errors) - self.assertLess(len(run.output), 500) + self.assertGreater(len(run.output), 20) + self.assertGreater(len(errors(run.errors)), 1) + self.assertLess(len(run.output), 2500) self.assertLess(len(errors(run.errors)), 800) # run = shell("cd {tmpdir} && {exe} -o {filename}".format(**locals()), returncodes = [3]) - self.assertLess(len(run.output), 500) + self.assertGreater(len(run.output), 20) + self.assertGreater(len(errors(run.errors)), 1) + self.assertLess(len(run.output), 2500) self.assertLess(len(errors(run.errors)), 800) self.assertIn("missing 21 bytes in zipfile", run.errors) self.assertIn('expected central file header signature not found', run.errors) -- 2.40.0