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

Method extract_with_none

Lib/test/test_tarfile.py:3391–3400  ·  view source on GitHub ↗
(self, *attr_names)

Source from the content-addressed store, hash-verified

3389
3390 @contextmanager
3391 def extract_with_none(self, *attr_names):
3392 DIR = pathlib.Path(TEMPDIR) / "extractall_none"
3393 self.tar.errorlevel = 0
3394 for member in self.tar.getmembers():
3395 for attr_name in attr_names:
3396 setattr(member, attr_name, None)
3397 with os_helper.temp_dir(DIR):
3398 self.tar.extractall(DIR, filter='fully_trusted')
3399 self.check_files_present(DIR)
3400 yield DIR
3401
3402 def test_extractall_none_mtime(self):
3403 # mtimes of extracted files should be later than 'now' -- the mtime

Calls 4

check_files_presentMethod · 0.95
getmembersMethod · 0.80
temp_dirMethod · 0.80
extractallMethod · 0.45

Tested by

no test coverage detected