From: Patrick Steinhardt Date: Wed, 22 May 2019 19:21:43 +0000 (+0200) Subject: test: use Python3-compatible way to specify octal numbers X-Git-Tag: v0.13.72~57^2~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d77ed5f4bc7c837aaffc633821e3d13852fceafa;p=zziplib test: use Python3-compatible way to specify octal numbers Support for zero-prefixed octal numbers ("0755") has been removed in Python 3 in favor of the zero-oh-prefix ("0o755"). As the latter has been introduced in Python 2.6, we can safely switch all occurrences of the former with the new way to improve compatibility with Python 3. --- diff --git a/test/zziptests.py b/test/zziptests.py index 3443c9b..fe16601 100644 --- a/test/zziptests.py +++ b/test/zziptests.py @@ -3482,7 +3482,7 @@ class ZZipTest(unittest.TestCase): setstub="./zzipsetstub" + exeext run = shell("{setstub} {exefile} {libstub}".format(**locals())) self.assertFalse(run.returncode) - os.chmod(exefile, 0755) + os.chmod(exefile, 0o755) # now ask the new .exe to show some of its own content run = shell("./{exefile} {txtfile_name}".format(**locals())) self.assertFalse(run.returncode)