Skip to content

Commit e29f458

Browse files
committed
Remove redundant assert_stat_equal
1 parent f15f1d1 commit e29f458

1 file changed

Lines changed: 0 additions & 21 deletions

File tree

‎Lib/test/test_os/test_os.py‎

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -5035,27 +5035,6 @@ def get_entries(self, names):
50355035
self.assertEqual(sorted(entries.keys()), names)
50365036
return entries
50375037

5038-
def assert_stat_equal(self, stat1, stat2, skip_fields):
5039-
if skip_fields:
5040-
for attr in dir(stat1):
5041-
if not attr.startswith("st_"):
5042-
continue
5043-
if attr in ("st_dev", "st_ino", "st_nlink", "st_ctime",
5044-
"st_ctime_ns"):
5045-
continue
5046-
value1 = getattr(stat1, attr)
5047-
value2 = getattr(stat2, attr)
5048-
if attr == "st_file_attributes":
5049-
# Filesystems may report attribute bits that aren't
5050-
# exposed by the stat module.
5051-
value1 &= FILE_ATTRIBUTE_MASK
5052-
value2 &= FILE_ATTRIBUTE_MASK
5053-
self.assertEqual(value1,
5054-
value2,
5055-
(stat1, stat2, attr))
5056-
else:
5057-
self.assertEqual(stat1, stat2)
5058-
50595038
def test_uninstantiable(self):
50605039
scandir_iter = os.scandir(self.path)
50615040
self.assertRaises(TypeError, type(scandir_iter))

0 commit comments

Comments
 (0)