from trace_commentor import Commentor from test_utils import asserteq_or_print def test_binop(): @Commentor() def target(): 1 + 1 asserteq_or_print( target(), ''' def target(): 1 + 1 """ 2 : 1 + 1 """ ''') def test_binop_cascade(): @Commentor() def target(): 1 + 1 + 1 asserteq_or_print( target(), ''' def target(): 1 + 1 + 1 """ 2 : 1 + 1 3 : 1 + 1 + 1 """ ''')