ub_test_reports/jsonparser.py:42 (39b73156) opens the report with open(self.json_path) β no encoding. On Windows that decodes with the locale encoding (cp1252 by default), so a JSON report carrying a non-ASCII character outside cp1252 β a test name with an emoji, a message with CJK text β fails with UnicodeDecodeError, or decodes to the wrong characters where cp1252 happens to accept the bytes. tox-envreport / the JSON shape the parser documents is UTF-8.
Pre-existing (the line moved unchanged from sphinx_test_reports in #2009); reviewer B of that PR measured that all 13 fixtures are pure ASCII, so the suite cannot see it. Fix: open(self.json_path, encoding="utf-8"), plus one fixture (or a tmp_path report) with a non-cp1252 character, red-first on a PYTHONUTF8=0 run or by monkeypatching locale.getpreferredencoding. Check junitparser.py while there: lxml parses bytes and honours the XML declaration, so it is not affected, but say so in the test.
ub_test_reports/jsonparser.py:42(39b73156) opens the report withopen(self.json_path)β noencoding. On Windows that decodes with the locale encoding (cp1252 by default), so a JSON report carrying a non-ASCII character outside cp1252 β a test name with an emoji, a message with CJK text β fails withUnicodeDecodeError, or decodes to the wrong characters where cp1252 happens to accept the bytes. tox-envreport / the JSON shape the parser documents is UTF-8.Pre-existing (the line moved unchanged from
sphinx_test_reportsin #2009); reviewer B of that PR measured that all 13 fixtures are pure ASCII, so the suite cannot see it. Fix:open(self.json_path, encoding="utf-8"), plus one fixture (or atmp_pathreport) with a non-cp1252 character, red-first on aPYTHONUTF8=0run or by monkeypatchinglocale.getpreferredencoding. Checkjunitparser.pywhile there:lxmlparses bytes and honours the XML declaration, so it is not affected, but say so in the test.