Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .current_session
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9c19e0b3-b43e-4d58-b3fe-89a43f26a4e3
fe1956ee-19bd-4c38-b24b-9eb2047644f7
23 changes: 15 additions & 8 deletions tests/test_phase43_execute.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,19 +183,26 @@ def runner(cmd, **kwargs):
}
with tempfile.TemporaryDirectory() as td:
dest = Path(td) / "wt"
# execute_tests_node builds dest under tmp/codeturtle-exec — inject checkout
out = execute_tests_node(
state,
runner=runner,
checkout=self._checkout(dest),
which=lambda n: "pytest",
)
# Do not pick up repos/<clone>/.venv from a live checkout on this machine.
missing_clone = Path(td) / "no-clone"
with patch(
"core.verification.execute.resolve_repo_dir",
return_value=missing_clone,
):
out = execute_tests_node(
state,
runner=runner,
checkout=self._checkout(dest),
which=lambda n: "pytest",
)
self.assertFalse(out["execution_report"]["skipped"])
self.assertEqual(out["execution_report"]["exit_code"], 0)
self.assertEqual(out["validated_findings"][0]["verification_status"], "supported")
self.assertTrue(out["validated_findings"][0]["tests_run"])
self.assertTrue(out["validated_findings"][0]["tests_passed"])
pytest_cmds = [c for c in calls if c and "pytest" in str(c[0])]
pytest_cmds = [
c for c in calls if any("pytest" in str(x) for x in c)
]
self.assertTrue(pytest_cmds)
self.assertIn(TEST_SAN, pytest_cmds[0] or pytest_cmds[-1])

Expand Down
42 changes: 24 additions & 18 deletions tests/test_phase43b_install.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,24 +172,30 @@ def fake_checkout(repo_dir, sha, dest_path, runner=None):
"title": "quoter",
}
]
out = execute_tests_node(
{
"execute_tests": True,
"execute_install": True,
"repo": "FalkorDB/QueryWeaver",
"number": 538,
"pr_head_sha": "abc",
"pr_facts": {
"classification": "source",
"files_changed": [SANITIZER, TEST_SAN],
"source_files": [SANITIZER],
},
"validated_findings": findings,
},
runner=runner,
checkout=fake_checkout,
which=_which_map(uv="uv", pytest="pytest"),
)
with tempfile.TemporaryDirectory() as td:
missing_clone = Path(td) / "no-clone"
with patch(
"core.verification.execute.resolve_repo_dir",
return_value=missing_clone,
):
out = execute_tests_node(
{
"execute_tests": True,
"execute_install": True,
"repo": "FalkorDB/QueryWeaver",
"number": 538,
"pr_head_sha": "abc",
"pr_facts": {
"classification": "source",
"files_changed": [SANITIZER, TEST_SAN],
"source_files": [SANITIZER],
},
"validated_findings": findings,
},
runner=runner,
checkout=fake_checkout,
which=_which_map(uv="uv", pytest="pytest"),
)
self.assertFalse(out["execution_report"]["skipped"])
self.assertEqual(out["execution_report"]["python_env"], "uv_sync")
self.assertTrue(out["execution_report"]["python"]["frozen"])
Expand Down
Loading