(pytester: Pytester)
| 1179 | |
| 1180 | |
| 1181 | def test_unicode_issue368(pytester: Pytester) -> None: |
| 1182 | path = pytester.path.joinpath("test.xml") |
| 1183 | log = LogXML(str(path), None) |
| 1184 | ustr = "ВНИ!" |
| 1185 | |
| 1186 | class Report(BaseReport): |
| 1187 | longrepr = ustr |
| 1188 | sections: List[Tuple[str, str]] = [] |
| 1189 | nodeid = "something" |
| 1190 | location = "tests/filename.py", 42, "TestClass.method" |
| 1191 | when = "teardown" |
| 1192 | |
| 1193 | test_report = cast(TestReport, Report()) |
| 1194 | |
| 1195 | # hopefully this is not too brittle ... |
| 1196 | log.pytest_sessionstart() |
| 1197 | node_reporter = log._opentestcase(test_report) |
| 1198 | node_reporter.append_failure(test_report) |
| 1199 | node_reporter.append_collect_error(test_report) |
| 1200 | node_reporter.append_collect_skipped(test_report) |
| 1201 | node_reporter.append_error(test_report) |
| 1202 | test_report.longrepr = "filename", 1, ustr |
| 1203 | node_reporter.append_skipped(test_report) |
| 1204 | test_report.longrepr = "filename", 1, "Skipped: 卡嘣嘣" |
| 1205 | node_reporter.append_skipped(test_report) |
| 1206 | test_report.wasxfail = ustr # type: ignore[attr-defined] |
| 1207 | node_reporter.append_skipped(test_report) |
| 1208 | log.pytest_sessionfinish() |
| 1209 | |
| 1210 | |
| 1211 | def test_record_property(pytester: Pytester, run_and_parse: RunAndParse) -> None: |
nothing calls this directly
no test coverage detected