(
self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str
)
| 233 | |
| 234 | @parametrize_families |
| 235 | def test_summing_simple_with_errors( |
| 236 | self, pytester: Pytester, run_and_parse: RunAndParse, xunit_family: str |
| 237 | ) -> None: |
| 238 | pytester.makepyfile( |
| 239 | """ |
| 240 | import pytest |
| 241 | @pytest.fixture |
| 242 | def fixture(): |
| 243 | raise Exception() |
| 244 | def test_pass(): |
| 245 | pass |
| 246 | def test_fail(): |
| 247 | assert 0 |
| 248 | def test_error(fixture): |
| 249 | pass |
| 250 | @pytest.mark.xfail |
| 251 | def test_xfail(): |
| 252 | assert False |
| 253 | @pytest.mark.xfail(strict=True) |
| 254 | def test_xpass(): |
| 255 | assert True |
| 256 | """ |
| 257 | ) |
| 258 | result, dom = run_and_parse(family=xunit_family) |
| 259 | assert result.ret |
| 260 | node = dom.get_first_by_tag("testsuite") |
| 261 | node.assert_attr(name="pytest", errors=1, failures=2, skipped=1, tests=5) |
| 262 | |
| 263 | @parametrize_families |
| 264 | def test_hostname_in_xml( |
nothing calls this directly
no test coverage detected