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

Method test_extractall_none_mode

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

Source from the content-addressed store, hash-verified

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
3420 # of a "normally" created directory or regular file
3421 dir_mode = pathlib.Path(TEMPDIR).stat().st_mode
3422 regular_file = pathlib.Path(TEMPDIR) / 'regular_file'
3423 regular_file.write_text('')
3424 regular_file_mode = regular_file.stat().st_mode
3425 with self.extract_with_none('mode') as DIR:
3426 for path in pathlib.Path(DIR).glob('**/*'):
3427 with self.subTest(path=path):
3428 if path.is_dir():
3429 self.assertEqual(path.stat().st_mode, dir_mode)
3430 elif path.is_file():
3431 self.assertEqual(path.stat().st_mode,
3432 regular_file_mode)
3433
3434 def test_extractall_none_uid(self):
3435 with self.extract_with_none('uid'):

Callers

nothing calls this directly

Calls 8

extract_with_noneMethod · 0.95
statMethod · 0.45
write_textMethod · 0.45
globMethod · 0.45
subTestMethod · 0.45
is_dirMethod · 0.45
assertEqualMethod · 0.45
is_fileMethod · 0.45

Tested by

no test coverage detected