Skip to content

Commit e0e74e3

Browse files
Update test case for higher bit and added news
1 parent 21de74d commit e0e74e3

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

Lib/test/test_stat.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,8 @@ def test_mode(self):
165165

166166
def test_filemode_does_not_misclassify_random_bits(self):
167167
# gh-144050 regression test
168-
self.assertEqual(self.statmod.filemode(32767)[0], "?")
168+
self.assertEqual(self.statmod.filemode(0o77777)[0], "?")
169+
self.assertEqual(self.statmod.filemode(0o177777)[0], "?")
169170

170171
@os_helper.skip_unless_working_chmod
171172
def test_directory(self):
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix stat.filemode in the pure-Python implementation to avoid misclassifying
2+
invalid mode values as block devices.

0 commit comments

Comments
 (0)