Skip to content

Commit 56ef82a

Browse files
fix(tests): write_text encoding='utf-8' for Windows CI (χ² in report)
Windows cp1252 default codec cannot encode U+03C7 (χ) emitted by rpt.to_markdown()/to_latex(). Linux/macOS default to UTF-8 so the bug was silent there. Explicit encoding='utf-8' fixes the smoke test on windows-latest × py3.11/3.12. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 6b2fdd3 commit 56ef82a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_cs_report_smoke.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ def run_demo(outdir: str = "/tmp", n_boot: int = 500, seed: int = 0):
7171
n_boot=n_boot, random_state=seed, verbose=False)
7272

7373
(outdir_p / "cs_report_demo.md").write_text(
74-
rpt.to_markdown(float_format="%.3f"))
74+
rpt.to_markdown(float_format="%.3f"), encoding="utf-8")
7575
(outdir_p / "cs_report_demo.tex").write_text(
7676
rpt.to_latex(float_format="%.3f",
7777
caption="CS report on the simulated DGP.",
78-
label="tab:cs_demo"))
78+
label="tab:cs_demo"), encoding="utf-8")
7979

8080
try:
8181
import matplotlib

0 commit comments

Comments
 (0)