def test_time3():
 ip = get_ipython()
 ip.user_ns.pop('run', None)
 with tt.AssertNotPrints('not found', channel='stderr'):
  ip.run_cell('%%time\nrun = 0\nrun += 1')

def test_time3 ( ) : ip = get_ipython ( ) ip . user_ns . pop ( 'run' , None ) with tt . AssertNotPrints ( 'not found' , channel = 'stderr' ) : ip . run_cell ( '%%time\nrun = 0\nrun += 1' )
erroneous magic function calls .