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

Method extract_with_none

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

Source from the content-addressed store, hash-verified

3372
3373 @contextmanager
3374 def extract_with_none(self, *attr_names):
3375 DIR = pathlib.Path(TEMPDIR) / "extractall_none"
3376 self.tar.errorlevel = 0
3377 for member in self.tar.getmembers():
3378 for attr_name in attr_names:
3379 setattr(member, attr_name, None)
3380 with os_helper.temp_dir(DIR):
3381 self.tar.extractall(DIR, filter='fully_trusted')
3382 self.check_files_present(DIR)
3383 yield DIR
3384
3385 def test_extractall_none_mtime(self):
3386 # mtimes of extracted files should be later than 'now' -- the mtime

Calls 4

check_files_presentMethod · 0.95
setattrFunction · 0.85
getmembersMethod · 0.80
extractallMethod · 0.45

Tested by

no test coverage detected