Skip to content

Commit e3458aa

Browse files
[3.11] gh-105089: Fix test_create_directory_with_write test failure in AIX (GH-105228) (GH-114861)
(cherry picked from commit 4dbb198) Co-authored-by: Ayappan Perumal <[email protected]>
1 parent 9979635 commit e3458aa

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Lib/test/test_zipfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2903,7 +2903,7 @@ def test_create_directory_with_write(self):
29032903

29042904
directory = os.path.join(TESTFN2, "directory2")
29052905
os.mkdir(directory)
2906-
mode = os.stat(directory).st_mode
2906+
mode = os.stat(directory).st_mode & 0xFFFF
29072907
zf.write(directory, arcname="directory2/")
29082908
zinfo = zf.filelist[1]
29092909
self.assertEqual(zinfo.filename, "directory2/")
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Fix
2+
``test.test_zipfile.test_core.TestWithDirectory.test_create_directory_with_write``
3+
test in AIX by doing a bitwise AND of 0xFFFF on mode , so that it will be in
4+
sync with ``zinfo.external_attr``

0 commit comments

Comments
 (0)