test: enforce ASCII output for 2fa remove and mode choice
Your AI's guard dog to stop it from going rogue.
Brought to you by:
doberman
Originally created by: slegarraga
Closes [#254].
Replaces the em dash in the 2fa remove warning with a plain hyphen and extends test_cli_encode_safe.py so the ASCII guarantee covers both the 2fa remove warning path and a bad parse_mode_choice error.
The bad-mode-choice message in current main already uses an ASCII hyphen, but the new test locks that contract in. Verified with the encode-safe test file.
Ticket changed by: fu351
Originally posted by: fu351
Merged. This is the valuable kind of test PR: I traced
test_2fa_remove_warning_output_is_asciiand it genuinely fails on the unfixed line (the em dash intwofa_remove's warning), so it guards the exact regression it names. Theparse_mode_choiceguard locks the other message in while it is still clean.Originally posted by: slegarraga
Thanks for the kind words and for verifying the ASCII regression test. It was a nice focused PR to work on.