def history_changed(proc, TIMEOUT, to):
 proc.send('\x1b[A')
 assert proc.expect([TIMEOUT, to])

def history_changed ( proc , TIMEOUT , to ) : proc . send ( '\x1b[A' ) assert proc . expect ( [ TIMEOUT , to ] )
ensures that history changed .