diff options
| author | owenjbendon-creator <281052257+owenjbendon-creator@users.noreply.github.com> | 2026-11-29 02:25:07 +0000 |
|---|---|---|
| committer | owenjbendon-creator <281052257+owenjbendon-creator@users.noreply.github.com> | 2026-11-29 02:25:07 +0000 |
| commit | befe3aa137c7e0f729906a1438b99dfacb8f669a (patch) | |
| tree | 3052bbd95c610990d7e5e6c31d23eacd4f95fef9 /runtime/test/cpp_unwind_test.cpp | |
| parent | 016554bef3697bcb705f9ea3360fabeb9a4841b5 (diff) | |
d3d12_run_fps: an error of argparse's own is rewritten from fixed texts (TOOLS-D3D12-RUN-FPS)
From the review of 016554bef: `--json=<text>` and `--help=<text>` still came
back in the error ("ignored explicit argument '<text>'"). argparse raises
that for a known flag before parse_known_args returns, so counting unknown
arguments could not catch it.
The parser is now a subclass whose error() rewrites every message argparse
raises from a short list of fixed texts, with the option's own name where it
names one: "takes no value", "needs a value", the three texts of the tool's
own argument types, "a log is needed", and "not understood" for anything the
list does not know (another Python's wording, a check argparse gains later).
The tool's own errors go through fail(), unchanged. Nothing typed can reach
an error message by any path.
Test: python -I tests/test_d3d12_run_fps.py (22 tests). New: argparse's own
errors for --json=<marker>, --help=<marker>, bad --edges and --min-samples
values, an unknown flag and a missing log, with plain, quoted and spaced
markers; a message the list does not know; the fixed texts are the argument
types' own.
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'runtime/test/cpp_unwind_test.cpp')
0 files changed, 0 insertions, 0 deletions