#NEWLINE# def test_infinite_scheduler( self ) : #NEWLINE# #INDENT# tt = mm . Timer ( mm . fixed_interval_scheduler ( 10 ) , self . callback , self . tag ) #NEWLINE# self . callback . side_effect = ( lambda x : ( None if ( self . time . current_time < 1000 ) else tt . cancel ( ) ) ) #NEWLINE# tt . start ( ) #NEWLINE# tt . join ( ) #NEWLINE# nt . assert_false ( tt . is_running ) #NEWLINE# nt . assert_equal ( tt . callback . call_count , ( 1000 / 10 ) ) #NEWLINE# nt . assert_equal ( self . time . sleeps , ( [ 11 , 8 ] + ( [ 9 ] * 98 ) ) )