diff --git a/.current_session b/.current_session index dfead40..a9978f9 100644 --- a/.current_session +++ b/.current_session @@ -1 +1 @@ -9c19e0b3-b43e-4d58-b3fe-89a43f26a4e3 \ No newline at end of file +fe1956ee-19bd-4c38-b24b-9eb2047644f7 \ No newline at end of file diff --git a/tests/test_phase43_execute.py b/tests/test_phase43_execute.py index b01925c..50018c9 100644 --- a/tests/test_phase43_execute.py +++ b/tests/test_phase43_execute.py @@ -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//.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]) diff --git a/tests/test_phase43b_install.py b/tests/test_phase43b_install.py index 9ec237c..fd57fe6 100644 --- a/tests/test_phase43b_install.py +++ b/tests/test_phase43b_install.py @@ -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"])