def test_flush():
 jobs = bg.BackgroundJobManager()
 j = jobs.new(sleeper)
 j.join()
 nt.assert_equal(len(jobs.completed), 1)
 nt.assert_equal(len(jobs.dead), 0)
 jobs.flush()
 nt.assert_equal(len(jobs.completed), 0)

def test_flush ( ) : jobs = bg . BackgroundJobManager ( ) j = jobs . new ( sleeper ) j . join ( ) nt . assert_equal ( len ( jobs . completed ) , 1 ) nt . assert_equal ( len ( jobs . dead ) , 0 ) jobs . flush ( ) nt . assert_equal ( len ( jobs . completed ) , 0 )
test job control .