MCPcopy Create free account
hub / github.com/ipython/ipython / test_longer

Function test_longer

IPython/lib/tests/test_backgroundjobs.py:77–88  ·  view source on GitHub ↗

Test control of longer-running jobs

()

Source from the content-addressed store, hash-verified

75
76
77def test_longer():
78 """Test control of longer-running jobs"""
79 jobs = bg.BackgroundJobManager()
80 # Sleep for long enough for the following two checks to still report the
81 # job as running, but not so long that it makes the test suite noticeably
82 # slower.
83 j = jobs.new(sleeper, 0.1)
84 nt.assert_equal(len(jobs.running), 1)
85 nt.assert_equal(len(jobs.completed), 0)
86 j.join()
87 nt.assert_equal(len(jobs.running), 0)
88 nt.assert_equal(len(jobs.completed), 1)

Callers

nothing calls this directly

Calls 1

newMethod · 0.95

Tested by

no test coverage detected