From: Ayappan Perumal Date: Thu, 1 Feb 2024 11:52:54 +0000 (+0530) Subject: gh-105089: Fix test_create_directory_with_write test failure in AIX (GH-105228) X-Git-Tag: v3.13.0a4~215 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4dbb198d279a06fed74ea4c38f93d658baf38170;p=thirdparty%2FPython%2Fcpython.git gh-105089: Fix test_create_directory_with_write test failure in AIX (GH-105228) --- diff --git a/Lib/test/test_zipfile/test_core.py b/Lib/test/test_zipfile/test_core.py index 9bdb08aeabb7..a177044d735b 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 000000000000..d04ef435dd57 --- /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``