#NEWLINE# def test_15_loops( self ) : #NEWLINE# #INDENT# def for_example( ) : #NEWLINE# #INDENT# for x in range ( 2 ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# #UNINDENT# self . run_and_compare ( while_example , [ ( 0 , 'call' ) , ( 1 , 'line' ) , ( 2 , 'line' ) , ( 1 , 'line' ) , ( 2 , 'line' ) , ( 1 , 'line' ) , ( 1 , 'return' ) ] ) #NEWLINE# def while_example( ) : #NEWLINE# #INDENT# x = 2 #NEWLINE# while ( x > 0 ) : #NEWLINE# #INDENT# x -= 1 #NEWLINE# #UNINDENT# #UNINDENT# self . run_and_compare ( while_example , [ ( 0 , 'call' ) , ( 2 , 'line' ) , ( 3 , 'line' ) , ( 4 , 'line' ) , ( 3 , 'line' ) , ( 4 , 'line' ) , ( 3 , 'line' ) , ( 3 , 'return' ) ] )