test_init_is_imported_lazily_inside_main¶
Tests › tests/test_init.py
What this test is for
Why it exists
`init` must stay runnable on an install missing the pipeline's heavier optional dependencies — it is the command that DIAGNOSES a broken install, so it cannot be the command that needs a whole one to start.
Verifies REQ-DDB-CLI-002
Given
source = inspect.getsource(cli.main)
When
- —
Then
- ✓ source contains "from .init_command import"
- ✓ inspect.getsource(cli).split("def main(")[0] does not contain "from .init_command import"
tests/test_init.py:1315 · its file's page
What it checks (2)
assert "from .init_command import" in sourcenot attributedassert "from .init_command import" not in inspect.getsource(cli).split("def main(")[0]not attributed
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)
| requirement | linked by | implementers exercised |
|---|---|---|
| REQ-DDB-CLI-002 | catalog | unknown |