#NEWLINE# def test_system_step_order( self ) : #NEWLINE# #INDENT# from grease import World #NEWLINE# world = World ( ) #NEWLINE# sys1 = world . systems . one = TestSystem ( ) #NEWLINE# sys3 = world . systems . three = TestSystem ( ) #NEWLINE# sys2 = TestSystem ( ) #NEWLINE# world . systems . insert ( 'two' , sys2 , index = 1 ) #NEWLINE# self . assertEqual ( len ( world . systems ) , 3 ) #NEWLINE# self . assertTrue ( ( sys1 . runtime == sys2 . runtime == sys3 . runtime == 0 ) ) #NEWLINE# self . assertTrue ( ( sys1 . order == sys2 . order == sys3 . order == TestSystem . order ) ) #NEWLINE# world . step ( 0.13 ) #NEWLINE# self . assertTrue ( ( sys1 . runtime == sys2 . runtime == sys3 . runtime == 0.13 ) ) #NEWLINE# start = sys1 . order #NEWLINE# self . assertEqual ( sys2 . order , ( start + 1 ) ) #NEWLINE# self . assertEqual ( sys3 . order , ( start + 2 ) )