(pytester: Pytester)
| 1241 | |
| 1242 | |
| 1243 | def test_unicode_issue368(pytester: Pytester) -> None: |
| 1244 | path = pytester.path.joinpath(class="st">"test.xml") |
| 1245 | log = LogXML(str(path), None) |
| 1246 | ustr = class="st">"ВНИ!" |
| 1247 | |
| 1248 | class Report(BaseReport): |
| 1249 | longrepr = ustr |
| 1250 | sections: list[tuple[str, str]] = [] |
| 1251 | nodeid = class="st">"something" |
| 1252 | location = class="st">"tests/filename.py", 42, class="st">"TestClass.method" |
| 1253 | when = class="st">"teardown" |
| 1254 | |
| 1255 | test_report = cast(TestReport, Report()) |
| 1256 | |
| 1257 | class="cm"># hopefully this is not too brittle ... |
| 1258 | log.pytest_sessionstart() |
| 1259 | node_reporter = log._opentestcase(test_report) |
| 1260 | node_reporter.append_failure(test_report) |
| 1261 | node_reporter.append_collect_error(test_report) |
| 1262 | node_reporter.append_collect_skipped(test_report) |
| 1263 | node_reporter.append_error(test_report) |
| 1264 | test_report.longrepr = class="st">"filename", 1, ustr |
| 1265 | node_reporter.append_skipped(test_report) |
| 1266 | test_report.longrepr = class="st">"filename", 1, class="st">"Skipped: 卡嘣嘣" |
| 1267 | node_reporter.append_skipped(test_report) |
| 1268 | test_report.wasxfail = ustr |
| 1269 | node_reporter.append_skipped(test_report) |
| 1270 | log.pytest_sessionfinish() |
| 1271 | |
| 1272 | |
| 1273 | def test_record_property(pytester: Pytester, run_and_parse: RunAndParse) -> None: |
nothing calls this directly
no test coverage detected