(self)
| 282 | |
| 283 | @contextlib.contextmanager |
| 284 | def fake_venv(self): |
| 285 | venv = Path.cwd() / "Scripts" |
| 286 | venv.mkdir(exist_ok=True, parents=True) |
| 287 | venv_exe = (venv / ("python_d.exe" if DEBUG_BUILD else "python.exe")) |
| 288 | venv_exe.touch() |
| 289 | try: |
| 290 | yield venv_exe, {"VIRTUAL_ENV": str(venv.parent)} |
| 291 | finally: |
| 292 | shutil.rmtree(venv) |
| 293 | |
| 294 | |
| 295 | class TestLauncher(unittest.TestCase, RunPyMixin): |
no test coverage detected