Skip to content

Commit 899d073

Browse files
committed
set up test env properly here too
1 parent b1056f8 commit 899d073

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

tests/test_test_runner.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ def test_sort(self):
3434
tests_project_rootdir=cur_dir_path.parent,
3535
)
3636

37+
test_env = os.environ.copy()
38+
test_env["CODEFLASH_TEST_ITERATION"] = "0"
39+
test_env["CODEFLASH_TRACER_DISABLE"] = "1"
40+
if "PYTHONPATH" not in test_env:
41+
test_env["PYTHONPATH"] = str(config.project_root_path)
42+
else:
43+
test_env["PYTHONPATH"] += os.pathsep + str(config.project_root_path)
44+
3745
with tempfile.TemporaryDirectory(dir=cur_dir_path) as temp_dir:
3846
test_file_path = Path(temp_dir) / "test_xx.py"
3947
test_files = TestFiles(
@@ -44,7 +52,7 @@ def test_sort(self):
4452
test_files,
4553
test_framework=config.test_framework,
4654
cwd=Path(config.project_root_path),
47-
test_env=os.environ.copy(),
55+
test_env=test_env,
4856
)
4957
results = parse_test_xml(result_file, test_files, config, process)
5058
assert results[0].did_pass, "Test did not pass as expected"

0 commit comments

Comments
 (0)