(self, pytester: Pytester, option)
| 1634 | result.stdout.fnmatch_lines([fclass="st">"*{bn}:3: Failed: test_func1"]) |
| 1635 | |
| 1636 | def test_pytest_report_header(self, pytester: Pytester, option) -> None: |
| 1637 | pytester.makeconftest( |
| 1638 | class="st">""" |
| 1639 | def pytest_sessionstart(session): |
| 1640 | session.config._somevalue = 42 |
| 1641 | def pytest_report_header(config): |
| 1642 | return class="st">"hello: %s" % config._somevalue |
| 1643 | class="st">""" |
| 1644 | ) |
| 1645 | pytester.mkdir(class="st">"a").joinpath(class="st">"conftest.py").write_text( |
| 1646 | class="st">""" |
| 1647 | def pytest_report_header(config, start_path): |
| 1648 | return [class="st">"line1", str(start_path)] |
| 1649 | class="st">""", |
| 1650 | encoding=class="st">"utf-8", |
| 1651 | ) |
| 1652 | result = pytester.runpytest(class="st">"a") |
| 1653 | result.stdout.fnmatch_lines([class="st">"*hello: 42*", class="st">"line1", str(pytester.path)]) |
| 1654 | |
| 1655 | def test_show_capture(self, pytester: Pytester) -> None: |
| 1656 | pytester.makepyfile( |
nothing calls this directly
no test coverage detected