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

Method test_extractall_none_mtime

Lib/test/test_tarfile.py:3402–3416  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

3400 yield DIR
3401
3402 def test_extractall_none_mtime(self):
3403 # mtimes of extracted files should be later than 'now' -- the mtime
3404 # of a previously created directory.
3405 now = pathlib.Path(TEMPDIR).stat().st_mtime
3406 with self.extract_with_none('mtime') as DIR:
3407 for path in pathlib.Path(DIR).glob('**/*'):
3408 with self.subTest(path=path):
3409 try:
3410 mtime = path.stat().st_mtime
3411 except OSError:
3412 # Some systems can't stat symlinks, ignore those
3413 if not path.is_symlink():
3414 raise
3415 else:
3416 self.assertGreaterEqual(path.stat().st_mtime, now)
3417
3418 def test_extractall_none_mode(self):
3419 # modes of directories and regular files should match the mode

Callers

nothing calls this directly

Calls 6

extract_with_noneMethod · 0.95
assertGreaterEqualMethod · 0.80
statMethod · 0.45
globMethod · 0.45
subTestMethod · 0.45
is_symlinkMethod · 0.45

Tested by

no test coverage detected