MCPcopy Index your code
hub / github.com/ipython/ipython / test_longer

Function test_longer

tests/test_backgroundjobs.py:76–87  ·  view source on GitHub ↗

Test control of longer-running jobs

()

Source from the content-addressed store, hash-verified

74
75
76def 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

Callers

nothing calls this directly

Calls 1

newMethod · 0.95

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…