(self, pytester: Pytester, option)
| 1451 | assert "def test_func2" not in s |
| 1452 | |
| 1453 | def test_pytest_report_header(self, pytester: Pytester, option) -> None: |
| 1454 | pytester.makeconftest( |
| 1455 | """ |
| 1456 | def pytest_sessionstart(session): |
| 1457 | session.config._somevalue = 42 |
| 1458 | def pytest_report_header(config): |
| 1459 | return "hello: %s" % config._somevalue |
| 1460 | """ |
| 1461 | ) |
| 1462 | pytester.mkdir("a").joinpath("conftest.py").write_text( |
| 1463 | """ |
| 1464 | def pytest_report_header(config, start_path): |
| 1465 | return ["line1", str(start_path)] |
| 1466 | """ |
| 1467 | ) |
| 1468 | result = pytester.runpytest("a") |
| 1469 | result.stdout.fnmatch_lines(["*hello: 42*", "line1", str(pytester.path)]) |
| 1470 | |
| 1471 | def test_show_capture(self, pytester: Pytester) -> None: |
| 1472 | pytester.makepyfile( |
nothing calls this directly
no test coverage detected