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')
| 45 | |
| 46 | @contextlib.contextmanager |
| 47 | def 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 |
no test coverage detected
searching dependent graphs…