(
self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str
)
| 817 | |
| 818 | @parametrize_families |
| 819 | def test_collect_error( |
| 820 | self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str |
| 821 | ) -> None: |
| 822 | pytester.makepyfile("syntax error") |
| 823 | result, dom = run_and_parse(family=xunit_family) |
| 824 | assert result.ret |
| 825 | node = dom.get_first_by_tag("testsuite") |
| 826 | node.assert_attr(errors=1, tests=1) |
| 827 | tnode = node.get_first_by_tag("testcase") |
| 828 | fnode = tnode.get_first_by_tag("error") |
| 829 | fnode.assert_attr(message="collection failure") |
| 830 | assert "SyntaxError" in fnode.toxml() |
| 831 | |
| 832 | def test_unicode(self, pytester: Pytester, run_and_parse: RunAndParse) -> None: |
| 833 | value = "hx\xc4\x85\xc4\x87\n" |
nothing calls this directly
no test coverage detected