[3.11] gh-105089: Fix test_create_directory_with_write test failure in AIX (GH-105228) (GH-114861)

(cherry picked from commit 4dbb198d27)

Co-authored-by: Ayappan Perumal <ayappap2@in.ibm.com>
This commit is contained in:
Miss Islington (bot) 2024-02-01 13:25:08 +01:00 committed by GitHub
parent 9979635612
commit e3458aa431
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 1 deletions

View File

@ -2903,7 +2903,7 @@ def test_create_directory_with_write(self):
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/")

View File

@ -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``