test_a_run_uses_the_repositorys_own_interpreter¶
Tests › tests/test_wiki_tracerun.py
What this test is for
Why it exists
THE TEST RUNS WHERE ITS DEPENDENCIES ARE: the repository's own virtual environment when it has one (`.venv`, then `venv`), clew's interpreter otherwise. The tracer is handed to that interpreter as a standalone plugin file — the target environment needs pytest, not clew.
Verifies REQ-DDB-WIKI-036 REQ-DDB-WIKI-049
Given
plain = tmp_path / "plain"plain.mkdir()
When
interpreter_for(plain)own = tmp_path / "own"(own / "venv" / "bin").mkdir(parents=True)
4 more
(own / "venv" / "bin" / "python").symlink_to(sys.executable)interpreter_for(own)(own / ".venv" / "bin").mkdir(parents=True)(own / ".venv" / "bin" / "python").symlink_to(sys.executable)
Then
- ✓ interpreter_for(plain) equals Path(sys.executable)
- ✓ interpreter_for(own) equals own / "venv" / "bin" / "python"
- ✓ interpreter_for(own) equals own / ".venv" / "bin" / "python"
tests/test_wiki_tracerun.py:223 · its file's page
What it checks (3)
assert interpreter_for(plain) == Path(sys.executable)observesinterpreter_forassert interpreter_for(own) == own / "venv" / "bin" / "python"observesinterpreter_forassert interpreter_for(own) == own / ".venv" / "bin" / "python"observesinterpreter_for
Where the product reaches it
No product flow reaches this code: no product entry point's flow calls any of the functions this test calls.
Call flow
What it reaches
Each row runs from this test, through the calls it makes, to the code a requirement names. If that code breaks, the test's checks are what should catch it. Reaching is not proving: a check only proves what it observes. No mutation records were given, so these rows say what the test REACHES.
Requirements it verifies (2)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-WIKI-036 | catalog | unknown |
| REQ-DDB-WIKI-049 | catalog | unknown |
Also reaches 1 requirement
Its run touches their code; that is reach, not proof.
- REQ-DDB-WIKI-035 measured