MCPcopy Create free account
hub / github.com/pytest-dev/pytest / test_disabled

Function test_disabled

testing/test_faulthandler.py:57–68  ·  view source on GitHub ↗

Test option to disable fault handler in the command line.

(pytester: Pytester)

Source from the content-addressed store, hash-verified

55
56
57def test_disabled(pytester: Pytester) -> None:
58 """Test option to disable fault handler in the command line."""
59 pytester.makepyfile(
60 """
61 import faulthandler
62 def test_disabled():
63 assert not faulthandler.is_enabled()
64 """
65 )
66 result = pytester.runpytest_subprocess("-p", "no:faulthandler")
67 result.stdout.fnmatch_lines(["*1 passed*"])
68 assert result.ret == 0
69
70
71@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytest_subprocessMethod · 0.45

Tested by

no test coverage detected