def skip_if_command_unavailable(cmd):
 from matplotlib.compat.subprocess import check_output
 try:
  check_output(cmd)
 except:
  return skipif(True, reason=(u'missing command: %s' % cmd[0]))
 return (lambda f: f)

def skip_if_command_unavailable ( cmd ) : from matplotlib . compat . subprocess import check_output try : check_output ( cmd ) except : return skipif ( True , reason = ( u'missing command: %s' % cmd [ 0 ] ) ) return ( lambda f : f )
skips a test if a command is unavailable .