(pytester: Pytester)
| 449 | |
| 450 | |
| 451 | def test_pytester_run_with_timeout(pytester: Pytester) -> None: |
| 452 | testfile = pytester.makepyfile("def test_no_timeout(): pass") |
| 453 | |
| 454 | timeout = 120 |
| 455 | |
| 456 | instant = _pytest.timing.Instant() |
| 457 | result = pytester.runpytest_subprocess(testfile, timeout=timeout) |
| 458 | duration = instant.elapsed() |
| 459 | |
| 460 | assert result.ret == ExitCode.OK |
| 461 | assert duration.seconds < timeout |
| 462 | |
| 463 | |
| 464 | def test_pytester_run_timeout_expires(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected