test_parser_defaults¶
Tests › tests/test_init.py
What this test is for
Why it exists
`--force`, `--yes` and `--dry-run` default off in the safe direction: nothing is replaced, nothing is written to a curated file unasked, and nothing is hidden.
Given
- —
When
args = init_command.build_parser().parse_args([])
Then
- ✓ args.scope equals INIT_SCOPE_REPO
- ✓ args.repo_root equals "."
- ✓ args.force is False
- ✓ args.dry_run is False
tests/test_init.py:1328 · its file's page
What it checks (4)
assert args.scope == INIT_SCOPE_REPOobservesbuild_parserviaargsassert args.repo_root == "."observesbuild_parserviaargsassert args.force is Falseobservesbuild_parserviaargsassert args.dry_run is Falseobservesbuild_parserviaargs
Where the product reaches it
main→propose_main→build_parser(flow)
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.
Also reaches 2 requirements
Its run touches their code; that is reach, not proof.
- REQ-DDB-CLI-001 measured
- REQ-DDB-CLI-002 measured