summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_zipfile/test_core.py2
-rw-r--r--Misc/NEWS.d/next/Tests/2023-06-02-05-04-15.gh-issue-105089.KaZFtU.rst4
2 files changed, 5 insertions, 1 deletions
diff --git a/Lib/test/test_zipfile/test_core.py b/Lib/test/test_zipfile/test_core.py
index 9bdb08a..a177044 100644
--- a/Lib/test/test_zipfile/test_core.py
+++ b/Lib/test/test_zipfile/test_core.py
@@ -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
index 0000000..d04ef43
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2023-06-02-05-04-15.gh-issue-105089.KaZFtU.rst
@@ -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``