view tests/test-check-pyflakes.t @ 21288:eb6eaef7ae44

help: provide a more helpful message when no keyword are matched Before this changeset, when no topic were matching the provided keyword ( in command such as `hg help --keyword babar`) the output was empty. This is confusing and unhelpful for new users seeking assistance in the help. We now display: $ hg help --keyword babar abort: no matches (try "hg help" for a list of topics) This send users in a new direction where they may find what they are looking for.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Wed, 16 Apr 2014 20:01:03 -0400
parents 4adc090fa2fb
children 507ce509fd22
line wrap: on
line source

#if test-repo pyflakes

  $ cd "`dirname "$TESTDIR"`"

run pyflakes on all tracked files ending in .py or without a file ending
(skipping binary file random-seed)

  $ hg locate 'set:**.py or grep("^!#.*python")' 2>/dev/null \
  > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
  contrib/win32/hgwebdir_wsgi.py:*: 'win32traceutil' imported but unused (glob)
  setup.py:*: 'sha' imported but unused (glob)
  setup.py:*: 'zlib' imported but unused (glob)
  setup.py:*: 'bz2' imported but unused (glob)
  setup.py:*: 'py2exe' imported but unused (glob)
  tests/hghave.py:*: '_lsprof' imported but unused (glob)
  tests/hghave.py:*: 'publish_cmdline' imported but unused (glob)
  tests/hghave.py:*: 'pygments' imported but unused (glob)
  tests/hghave.py:*: 'ssl' imported but unused (glob)
  contrib/win32/hgwebdir_wsgi.py:93: 'from isapi.install import *' used; unable to detect undefined names (glob)
  tests/filterpyflakes.py:59: undefined name 'undefinedname'
  
#endif