Commit 7415af6
tests: sweep \
Replaces 52 vague substring/membership assertions across \`test_cli.py\`,
\`test_transfer.py\`, and \`test_gc.py\` with structured parsers + exact
equality. Each test now reads as a spec of behavior — the parsed
\`ClickHelp\`, \`Version\`, \`StatusOutput\`, \`StatusItem\`, \`DryRunResult\`,
\`TransferResult\` shape captures everything the test asserts about,
and a regression that mutates an adjacent line in the output fails
loudly instead of silently slipping through.
Per CLAUDE.md "Testing" section (and the new prominent preamble at
the top): tests are specs, not vague membership checks. Same
treatment as \`test_run_push_s3.py\` got earlier.
Notable parsers added:
- \`parse_click_help\` (Click's --help shape — usage, description,
options, commands)
- \`parse_version\` (\`DVX version: ... / DVC version: ...\`)
- \`parse_status\` (dvx status: groups, items, summary)
- \`parse_dry_run\` / \`parse_transfer\` (push/pull dry-run + real)
The transfer parser searches across the full output for summary
lines because DVC's \`\\r\`-based progress bar leaves \`Would push N
file(s) ...\` concatenated to the bar tail rather than on its own
line — anchored line-by-line matching fails there.
Full test suite: 197 passed, 4 skipped.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>in result.output\ / \in collection\ membership checks1 parent 0052790 commit 7415af6
3 files changed
Lines changed: 437 additions & 113 deletions
0 commit comments