test_the_editable_probe_defaults_to_strict

Tests › tests/test_freshness.py

passed Passed in the packaged run.

What this test is for

Why it exists

WHAT THIS PROTECTS is the assertion above, not any product behaviour. A probe that drifted to True everywhere would disable the stale-installed-code check silently and leave the test passing — the same shape as the "unknown" fallback it sits beside: a weakened check that still renders as a pass.

Verifies REQ-DDB-MCP-004

Given

  1. —
→

When

  1. —
→

Then

  1. ✓ _editable_from(None) is False
  2. ✓ _editable_from('{"url": "file:///src", "dir_info": {}}') is False
  3. ✓ _editable_from("not json at all") is False
  4. ✓ _editable_from('{"dir_info": {"editable": true}}') is True
  5. ✓ _installed_editable() is True

tests/test_freshness.py:818 · its file's page

What it checks (5)

  1. assert _editable_from(None) is False, "a PyPI wheel writes no direct_url.json at all" observes _editable_from
  2. assert _editable_from('{"url": "file:///src", "dir_info": {}}') is False, ( "a local non-editable install writes the file without the flag" ) observes _editable_from
  3. assert _editable_from("not json at all") is False, "unparseable provenance is not proof" observes _editable_from
  4. assert _editable_from('{"dir_info": {"editable": true}}') is True observes _editable_from
  5. assert _installed_editable() is True, "this repository is installed with `pip install -e`" observes _installed_editable

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_the_editable_probe_defaults_to_strict→_editable_from→_installed_editable

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 (1)

requirementlinked byimplementers exercised
REQ-DDB-MCP-004catalogunknown