(self, pytester: Pytester, option)
| 1430 | assert "IndexError" not in s |
| 1431 | |
| 1432 | def test_tb_crashline(self, pytester: Pytester, option) -> None: |
| 1433 | p = pytester.makepyfile( |
| 1434 | """ |
| 1435 | import pytest |
| 1436 | def g(): |
| 1437 | raise IndexError |
| 1438 | def test_func1(): |
| 1439 | print(6*7) |
| 1440 | g() # --calling-- |
| 1441 | def test_func2(): |
| 1442 | assert 0, "hello" |
| 1443 | """ |
| 1444 | ) |
| 1445 | result = pytester.runpytest("--tb=line") |
| 1446 | bn = p.name |
| 1447 | result.stdout.fnmatch_lines( |
| 1448 | ["*%s:3: IndexError*" % bn, "*%s:8: AssertionError: hello*" % bn] |
| 1449 | ) |
| 1450 | s = result.stdout.str() |
| 1451 | assert "def test_func2" not in s |
| 1452 | |
| 1453 | def test_pytest_report_header(self, pytester: Pytester, option) -> None: |
| 1454 | pytester.makeconftest( |
nothing calls this directly
no test coverage detected