MCPcopy Index your code
hub / github.com/nodejs/node / temp_base

Function temp_base

deps/v8/tools/testrunner/utils/test_utils.py:47–59  ·  view source on GitHub ↗

Wrapper that sets up a temporary V8 test root. Args: baseroot: The folder with the test root blueprint. All files will be copied to the temporary test root, to guarantee a fresh setup with no dirty state.

(baseroot='testroot1')

Source from the content-addressed store, hash-verified

45
46@contextlib.contextmanager
47def temp_base(baseroot='testroot1'):
48 """Wrapper that sets up a temporary V8 test root.
49
50 Args:
51 baseroot: The folder with the test root blueprint. All files will be
52 copied to the temporary test root, to guarantee a fresh setup with no
53 dirty state.
54 """
55 basedir = TEST_DATA_ROOT / baseroot
56 with temp_dir() as tempbase:
57 if basedir.exists():
58 shutil.copytree(basedir, tempbase, dirs_exist_ok=True)
59 yield tempbase
60
61
62@contextlib.contextmanager

Callers 3

run_testsMethod · 0.85
get_runner_optionsMethod · 0.85

Calls 2

temp_dirFunction · 0.85
existsMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…