From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Thu, 1 Feb 2024 12:25:08 +0000 (+0100) Subject: [3.11] gh-105089: Fix test_create_directory_with_write test failure in AIX (GH-105228... X-Git-Tag: v3.11.8~40 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e3458aa431cd28ad0350d3f1cc300abb817b68cc;p=thirdparty%2FPython%2Fcpython.git [3.11] gh-105089: Fix test_create_directory_with_write test failure in AIX (GH-105228) (GH-114861) (cherry picked from commit 4dbb198d279a06fed74ea4c38f93d658baf38170) Co-authored-by: Ayappan Perumal --- diff --git a/Lib/test/test_zipfile.py b/Lib/test/test_zipfile.py index 9354ab74faa9..29d981e6403e 100644 --- a/Lib/test/test_zipfile.py +++ b/Lib/test/test_zipfile.py @@ -2903,7 +2903,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``