test_a_run_uses_the_repositorys_own_interpreter

Tests › tests/test_wiki_tracerun.py

passed Passed in the packaged run.

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

  1. plain = tmp_path / "plain"
  2. plain.mkdir()
→

When

  1. interpreter_for(plain)
  2. own = tmp_path / "own"
  3. (own / "venv" / "bin").mkdir(parents=True)
4 more
  1. (own / "venv" / "bin" / "python").symlink_to(sys.executable)
  2. interpreter_for(own)
  3. (own / ".venv" / "bin").mkdir(parents=True)
  4. (own / ".venv" / "bin" / "python").symlink_to(sys.executable)
→

Then

  1. ✓ interpreter_for(plain) equals Path(sys.executable)
  2. ✓ interpreter_for(own) equals own / "venv" / "bin" / "python"
  3. ✓ interpreter_for(own) equals own / ".venv" / "bin" / "python"

tests/test_wiki_tracerun.py:223 · its file's page

What it checks (3)

  1. assert interpreter_for(plain) == Path(sys.executable) observes interpreter_for
  2. assert interpreter_for(own) == own / "venv" / "bin" / "python" observes interpreter_for
  3. assert interpreter_for(own) == own / ".venv" / "bin" / "python" observes interpreter_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

test_a_run_uses_the_repositorys_own_interpreter→interpreter_for

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.

test_a_run_uses_the_repositorys_own_interpreter · 3 checksinterpreter_forREQ-DDB-WIKI-035 · measured

Requirements it verifies (2)

requirementlinked byimplementers exercised
REQ-DDB-WIKI-036catalogunknown
REQ-DDB-WIKI-049catalogunknown
Also reaches 1 requirement

Its run touches their code; that is reach, not proof.