MCPcopy Index your code
hub / github.com/python/cpython / assert_stat_equal

Method assert_stat_equal

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

Source from the content-addressed store, hash-verified

4800 return entries
4801
4802 def assert_stat_equal(self, stat1, stat2, skip_fields):
4803 if skip_fields:
4804 for attr in dir(stat1):
4805 if not attr.startswith("st_"):
4806 continue
4807 if attr in ("st_dev", "st_ino", "st_nlink", "st_ctime",
4808 "st_ctime_ns"):
4809 continue
4810 self.assertEqual(getattr(stat1, attr),
4811 getattr(stat2, attr),
4812 (stat1, stat2, attr))
4813 else:
4814 self.assertEqual(stat1, stat2)
4815
4816 def test_uninstantiable(self):
4817 scandir_iter = os.scandir(self.path)

Callers 1

check_entryMethod · 0.95

Calls 2

startswithMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected