mirror of
https://github.com/ProjectLeonida/mandy.git
synced 2026-12-06 09:08:38 +00:00
smoke, test_docs_cli_flags: guard stdout encoding and map dev.py smoke subcommand
Address review feedback from @Poussistar on #705: 1. Reconfigure sys.stdout with errors='replace' in scripts/smoke.py's __main__ block to satisfy repository-wide test_tool_stdout_encoding.py. 2. Register 'smoke': 'scripts/smoke.py' in tests/test_docs_cli_flags.py DEV_PRODUCERS map so fenced docs commands invoking 'dev.py smoke --quick' do not report --quick as an unknown flag of dev.py. AI-assisted (Claude Code)
This commit is contained in:
@ -325,4 +325,8 @@ def main(argv: list[str] | None = None) -> int:
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
try:
|
||||
sys.stdout.reconfigure(errors="replace")
|
||||
except (AttributeError, ValueError, OSError):
|
||||
pass
|
||||
raise SystemExit(main())
|
||||
|
||||
@ -164,6 +164,7 @@ def fenced_commands(text):
|
||||
DEV_PRODUCERS = {
|
||||
"boot-trace": "tools/boot_trace.py",
|
||||
"guest-scene": "scripts/run_guest_scene.py",
|
||||
"smoke": "scripts/smoke.py",
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user