Make sure custom reasons are used.
(pytester: Pytester)
| 762 | |
| 763 | |
| 764 | def test_importorskip_custom_reason(pytester: Pytester) -> None: |
| 765 | """Make sure custom reasons are used.""" |
| 766 | pytester.makepyfile( |
| 767 | """ |
| 768 | import pytest |
| 769 | foobarbaz = pytest.importorskip("foobarbaz2", reason="just because") |
| 770 | |
| 771 | def test_foo(): |
| 772 | pass |
| 773 | """ |
| 774 | ) |
| 775 | result = pytester.runpytest("-ra") |
| 776 | result.stdout.fnmatch_lines(["*just because*"]) |
| 777 | result.stdout.fnmatch_lines(["*collected 0 items / 1 skipped*"]) |
| 778 | |
| 779 | |
| 780 | def test_pytest_cmdline_main(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected