(self, pytester: Pytester)
| 222 | # assert rep.longrepr.reprtraceback.reprentries |
| 223 | |
| 224 | def test_custom_failure_repr(self, pytester: Pytester) -> None: |
| 225 | pytester.makepyfile( |
| 226 | conftest=""" |
| 227 | import pytest |
| 228 | class Function(pytest.Function): |
| 229 | def repr_failure(self, excinfo): |
| 230 | return "hello" |
| 231 | """ |
| 232 | ) |
| 233 | reports = pytester.runitem( |
| 234 | """ |
| 235 | import pytest |
| 236 | def test_func(): |
| 237 | assert 0 |
| 238 | """ |
| 239 | ) |
| 240 | rep = reports[1] |
| 241 | assert not rep.skipped |
| 242 | assert not rep.passed |
| 243 | assert rep.failed |
| 244 | # assert rep.outcome.when == "call" |
| 245 | # assert rep.failed.where.lineno == 3 |
| 246 | # assert rep.failed.where.path.basename == "test_func.py" |
| 247 | # assert rep.failed.failurerepr == "hello" |
| 248 | |
| 249 | def test_teardown_final_returncode(self, pytester: Pytester) -> None: |
| 250 | rec = pytester.inline_runsource( |
nothing calls this directly
no test coverage detected