]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-105089: Fix test_create_directory_with_write test failure in AIX (GH-105228)
authorAyappan Perumal <ayappap2@in.ibm.com>
Thu, 1 Feb 2024 11:52:54 +0000 (17:22 +0530)
committerGitHub <noreply@github.com>
Thu, 1 Feb 2024 11:52:54 +0000 (11:52 +0000)
Lib/test/test_zipfile/test_core.py
Misc/NEWS.d/next/Tests/2023-06-02-05-04-15.gh-issue-105089.KaZFtU.rst [new file with mode: 0644]

index 9bdb08aeabb78175d78b5c398a417410d20317a2..a177044d735bed70d9452ed480f8a70bc596abf8 100644 (file)
@@ -2959,7 +2959,7 @@ class TestWithDirectory(unittest.TestCase):
 
             directory = os.path.join(TESTFN2, "directory2")
             os.mkdir(directory)
-            mode = os.stat(directory).st_mode
+            mode = os.stat(directory).st_mode & 0xFFFF
             zf.write(directory, arcname="directory2/")
             zinfo = zf.filelist[1]
             self.assertEqual(zinfo.filename, "directory2/")
diff --git a/Misc/NEWS.d/next/Tests/2023-06-02-05-04-15.gh-issue-105089.KaZFtU.rst b/Misc/NEWS.d/next/Tests/2023-06-02-05-04-15.gh-issue-105089.KaZFtU.rst
new file mode 100644 (file)
index 0000000..d04ef43
--- /dev/null
@@ -0,0 +1,4 @@
+Fix
+``test.test_zipfile.test_core.TestWithDirectory.test_create_directory_with_write``
+test in AIX by doing a bitwise AND of 0xFFFF on mode , so that it will be in
+sync with ``zinfo.external_attr``