diff --git a/scripts/run_tests_batched.py b/scripts/run_tests_batched.py index 70369f76..d173178e 100644 --- a/scripts/run_tests_batched.py +++ b/scripts/run_tests_batched.py @@ -207,6 +207,14 @@ def _print_summary(results: list[tuple[Batch, int, float]]) -> int: return worst def main() -> int: + try: + sys.stdout.reconfigure(encoding="utf-8", errors="replace") + except Exception: + pass + try: + sys.stderr.reconfigure(encoding="utf-8", errors="replace") + except Exception: + pass p = argparse.ArgumentParser() p.add_argument("--tests-dir", default=str(_PROJECT_ROOT / "tests")) p.add_argument("--registry", default=str(_PROJECT_ROOT / "tests" / "test_categories.toml"))