MCPcopy Index your code
hub / github.com/RustPython/RustPython / assert_stat_equal

Method assert_stat_equal

Lib/test/test_os.py:5077–5089  ·  view source on GitHub ↗
(self, stat1, stat2, skip_fields)

Source from the content-addressed store, hash-verified

5075 return entries
5076
5077 def assert_stat_equal(self, stat1, stat2, skip_fields):
5078 if skip_fields:
5079 for attr in dir(stat1):
5080 if not attr.startswith("st_"):
5081 continue
5082 if attr in ("st_dev", "st_ino", "st_nlink", "st_ctime",
5083 "st_ctime_ns"):
5084 continue
5085 self.assertEqual(getattr(stat1, attr),
5086 getattr(stat2, attr),
5087 (stat1, stat2, attr))
5088 else:
5089 self.assertEqual(stat1, stat2)
5090
5091 def test_uninstantiable(self):
5092 scandir_iter = os.scandir(self.path)

Callers 1

check_entryMethod · 0.95

Calls 4

dirFunction · 0.85
getattrFunction · 0.85
startswithMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected