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

Function test_pytester_run_timeout_expires

testing/test_pytester.py:474–483  ·  view source on GitHub ↗
(pytester: Pytester)

Source from the content-addressed store, hash-verified

472
473
474def test_pytester_run_timeout_expires(pytester: Pytester) -> None:
475 testfile = pytester.makepyfile(
476 """
477 import time
478
479 def test_timeout():
480 time.sleep(10)"""
481 )
482 with pytest.raises(pytester.TimeoutExpired):
483 pytester.runpytest_subprocess(testfile, timeout=1)
484
485
486def test_linematcher_with_nonlist() -> None:

Callers

nothing calls this directly

Calls 2

makepyfileMethod · 0.45
runpytest_subprocessMethod · 0.45

Tested by

no test coverage detected