]> granicus.if.org Git - zziplib/commitdiff
test: use Python3-compatible way to specify octal numbers
authorPatrick Steinhardt <ps@pks.im>
Wed, 22 May 2019 19:21:43 +0000 (21:21 +0200)
committerPatrick Steinhardt <ps@pks.im>
Thu, 1 Aug 2019 06:35:33 +0000 (08:35 +0200)
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.

test/zziptests.py

index 3443c9b07476f63610a061a0c1535ef35da6a8ed..fe16601fbc42d1efccc9ceb0ed0ab2801197b57f 100644 (file)
@@ -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)