(pytester: Pytester)
| 458 | |
| 459 | |
| 460 | def test_pytester_run_with_timeout(pytester: Pytester) -> None: |
| 461 | testfile = pytester.makepyfile("def test_no_timeout(): pass") |
| 462 | |
| 463 | timeout = 120 |
| 464 | |
| 465 | start = time.time() |
| 466 | result = pytester.runpytest_subprocess(testfile, timeout=timeout) |
| 467 | end = time.time() |
| 468 | duration = end - start |
| 469 | |
| 470 | assert result.ret == ExitCode.OK |
| 471 | assert duration < timeout |
| 472 | |
| 473 | |
| 474 | def test_pytester_run_timeout_expires(pytester: Pytester) -> None: |
nothing calls this directly
no test coverage detected