Skip to content

test(cli): drop vestigial --open/--closed boolean-flag tests#558

Open
FileSystemGuy wants to merge 1 commit into
mainfrom
fix/group-B-obsolete-open-closed-flag-tests
Open

test(cli): drop vestigial --open/--closed boolean-flag tests#558
FileSystemGuy wants to merge 1 commit into
mainfrom
fix/group-B-obsolete-open-closed-flag-tests

Conversation

@FileSystemGuy

Copy link
Copy Markdown
Contributor

Summary

PR #412 reshaped the CLI from boolean `--open`/`--closed` flags into a positional `mode` argument (`closed`|`open`|`whatif`). Argparse no longer defines either flag — `grep -rn 'add_argument.*--open|--closed' mlpstorage_py/` returns zero hits — so:

  • The 4 `TestOpenClosedCLIFlags` tests exercise nonexistent parser behavior. They were failing with SystemExit when argparse rejected the unknown flag.
  • The 6 `TestVerifyBenchmarkOpenFlag` tests build pre-CLI redesign: three-mode positional parser (closed/open/whatif) #412 `args.Namespace` shapes that `verify_benchmark` no longer consumes (it reads `args.mode` now). They were failing with `AttributeError: 'Namespace' object has no attribute 'mode'`.

All 10 tests aren't asserting any contract worth re-affirming on the current codebase. The post-#412 dispatch tests (`TestVerifyBenchmarkPost412ModeDispatch`) already cover the modern contract — that's the file's value going forward. Kept those plus the kvcache helper-predicate test.

Refreshed the module docstring to reflect the new scope and the history of why the file exists (links the original #349#412#352 thread for future archaeology).

Test plan

  • `uv run python -m pytest mlpstorage_py/tests/test_open_closed_flag_recognition.py -v` → 5 passed (was 5 passed + 10 failed)
  • Verified the modern contract is still exercised by the kept `TestVerifyBenchmarkPost412ModeDispatch` class (4 tests) covering closed/open/whatif/closed-rejecting-OPEN-only-params dispatch.

PR #412 reshaped the CLI from boolean `--open`/`--closed` flags into a
positional `mode` argument (closed|open|whatif). Argparse no longer
defines either flag — `grep -rn 'add_argument.*--open|--closed'
mlpstorage_py/` returns zero hits — so the four `TestOpenClosedCLIFlags`
tests now exercise nonexistent parser behavior, and the six
`TestVerifyBenchmarkOpenFlag` tests build pre-#412 args.Namespace
shapes that `verify_benchmark` no longer consumes (it reads args.mode
now per the post-#412 dispatch contract).

All 10 tests were failing with predictable AttributeError /
SystemExit-from-unknown-argument errors. They aren't asserting any
contract worth re-affirming on the current codebase.

The post-#412 dispatch tests (`TestVerifyBenchmarkPost412ModeDispatch`)
already cover the modern contract — that's the file's value going
forward. Kept those plus the kvcache helper-predicate test.

Updated the module docstring to reflect the new scope and the history
of why the file exists (links the original #349 / #412 / #352 thread
for archaeology).

Result: 5 passed + 10 failed → 5 passed.
@FileSystemGuy FileSystemGuy requested a review from a team June 26, 2026 23:10
@github-actions

Copy link
Copy Markdown

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant