Test control of longer-running jobs
()
| 74 | |
| 75 | |
| 76 | def test_longer(): |
| 77 | """Test control of longer-running jobs""" |
| 78 | jobs = bg.BackgroundJobManager() |
| 79 | # Sleep for long enough for the following two checks to still report the |
| 80 | # job as running, but not so long that it makes the test suite noticeably |
| 81 | # slower. |
| 82 | j = jobs.new(sleeper, 0.1) |
| 83 | assert len(jobs.running) == 1 |
| 84 | assert len(jobs.completed) == 0 |
| 85 | j.join() |
| 86 | assert len(jobs.running) == 0 |
| 87 | assert len(jobs.completed) == 1 |
nothing calls this directly
no test coverage detected
searching dependent graphs…