MCPcopy
hub / github.com/pytest-dev/pytest / test_disabled

Function test_disabled

testing/test_faulthandler.py:61–72  ·  view source on GitHub ↗

Test option to disable fault handler in the command line.

(pytester: Pytester)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 3

fnmatch_linesMethod · 0.80
makepyfileMethod · 0.45
runpytest_subprocessMethod · 0.45

Tested by

no test coverage detected