def history_not_changed(proc, TIMEOUT):
 proc.send('\x1b[A')
 assert proc.expect([TIMEOUT, u'fuck'])

def history_not_changed ( proc , TIMEOUT ) : proc . send ( '\x1b[A' ) assert proc . expect ( [ TIMEOUT , u'fuck' ] )
ensures that history not changed .