tests/test-check-pyflakes.t
author Martin von Zweigbergk <martinvonz@google.com>
Wed, 17 Jul 2019 11:45:37 -0700
changeset 4754 75307f276a79
parent 4333 824fcba2cdb4
permissions -rw-r--r--
py3: make random topic name generation consistent across py2/py3 random.choice() (and others based on random.randint()) changed between py2 and py3 without a way to get the py2 behavior. However, random.random() did not change, so we can re-implement random.choice() based on that.

#require test-repo pyflakes

Copied from Mercurial core (60ee2593a270)

  $ cd "`dirname "$TESTDIR"`"

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

  $ hg locate -I 'set:(**.py or grep("^#!.*python")) - removed()' 2>/dev/null \
  > | xargs pyflakes 2>/dev/null