Test pytest.fail(..., pytrace=False) does not show tracebacks during collection.
(pytester: Pytester)
| 631 | |
| 632 | |
| 633 | def test_pytest_fail_notrace_collection(pytester: Pytester) -> None: |
| 634 | """Test pytest.fail(..., pytrace=False) does not show tracebacks during collection.""" |
| 635 | pytester.makepyfile( |
| 636 | """ |
| 637 | import pytest |
| 638 | def some_internal_function(): |
| 639 | pytest.fail("hello", pytrace=False) |
| 640 | some_internal_function() |
| 641 | """ |
| 642 | ) |
| 643 | result = pytester.runpytest() |
| 644 | result.stdout.fnmatch_lines(["hello"]) |
| 645 | result.stdout.no_fnmatch_line("*def some_internal_function()*") |
| 646 | |
| 647 | |
| 648 | def test_pytest_fail_notrace_non_ascii(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected