(
self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str
)
| 750 | |
| 751 | @parametrize_families |
| 752 | def test_collect_error( |
| 753 | self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str |
| 754 | ) -> None: |
| 755 | pytester.makepyfile("syntax error") |
| 756 | result, dom = run_and_parse(family=xunit_family) |
| 757 | assert result.ret |
| 758 | node = dom.find_first_by_tag("testsuite") |
| 759 | node.assert_attr(errors=1, tests=1) |
| 760 | tnode = node.find_first_by_tag("testcase") |
| 761 | fnode = tnode.find_first_by_tag("error") |
| 762 | fnode.assert_attr(message="collection failure") |
| 763 | assert "SyntaxError" in fnode.toxml() |
| 764 | |
| 765 | def test_unicode(self, pytester: Pytester, run_and_parse: RunAndParse) -> None: |
| 766 | value = "hx\xc4\x85\xc4\x87\n" |
nothing calls this directly
no test coverage detected