Run shell-based CGC tests against the current interpreter in an isolated HOME.
()
| 22 | |
| 23 | |
| 24 | def _test_env(): |
| 25 | """Run shell-based CGC tests against the current interpreter in an isolated HOME.""" |
| 26 | TEST_HOME.mkdir(parents=True, exist_ok=True) |
| 27 | env = os.environ.copy() |
| 28 | env["HOME"] = str(TEST_HOME) |
| 29 | env["DEFAULT_DATABASE"] = "falkordb" |
| 30 | env["CGC_CONTEXT_MODE"] = "global" |
| 31 | env["PYTHONDONTWRITEBYTECODE"] = "1" |
| 32 | # Ensure all current sys.path entries are in PYTHONPATH so dependencies and -m work |
| 33 | env["PYTHONPATH"] = os.pathsep.join(sys.path) |
| 34 | return env |
| 35 | |
| 36 | def get_unique_test_dir(): |
| 37 | """Generate unique test directory""" |