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

Method setUpClass

Lib/test/test_tarfile.py:3362–3374  ·  view source on GitHub ↗
(cls)

Source from the content-addressed store, hash-verified

3360
3361 @classmethod
3362 def setUpClass(cls):
3363 tar = tarfile.open(tarname, mode='r', encoding="iso8859-1")
3364 cls.control_dir = pathlib.Path(TEMPDIR) / "extractall_ctrl"
3365 tar.errorlevel = 0
3366 with ExitStack() as cm:
3367 if cls.extraction_filter is None:
3368 cm.enter_context(warnings.catch_warnings(
3369 action="ignore", category=DeprecationWarning))
3370 tar.extractall(cls.control_dir, filter=cls.extraction_filter)
3371 tar.close()
3372 cls.control_paths = set(
3373 p.relative_to(cls.control_dir)
3374 for p in pathlib.Path(cls.control_dir).glob('**/*'))
3375
3376 @classmethod
3377 def tearDownClass(cls):

Callers

nothing calls this directly

Calls 8

ExitStackClass · 0.90
setFunction · 0.85
enter_contextMethod · 0.80
openMethod · 0.45
extractallMethod · 0.45
closeMethod · 0.45
relative_toMethod · 0.45
globMethod · 0.45

Tested by

no test coverage detected