sapling/tests/test-check-pyflakes.t
Jun Wu c5985f2ec0 setup: drop install_requires
Summary:
`install_requires` is not well supported. And the subverty detection is not
meaningful - it checks at package build time, not package install time.

```
/usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'install_requires'
  warnings.warn(msg)
```

Reviewed By: markbt

Differential Revision: D7626055

fbshipit-source-id: 061147f02698ad46561c95d2039f0a8ad26182d2
2018-04-17 16:35:25 -07:00

25 lines
685 B
Perl

#require test-repo pyflakes
$ . "$TESTDIR/helpers-testrepo.sh"
run pyflakes on all tracked files ending in .py or without a file ending
(skipping binary file random-seed)
$ PYFLAKES=${HGTEST_PYFLAKES_PATH:-pyflakes}
$ cat > test.py <<EOF
> print(undefinedname)
> EOF
$ "$PYFLAKES" test.py 2>/dev/null | "$TESTDIR/filterpyflakes.py"
test.py:1: undefined name 'undefinedname'
$ cd "`dirname "$TESTDIR"`"
$ testrepohg locate '**.py' -I '.' \
> -X hgext/fsmonitor/pywatchman \
> -X mercurial/pycompat.py -X contrib/python-zstandard \
> -X hg-git \
> -X fb/packaging \
> 2>/dev/null \
> | xargs "$PYFLAKES" 2>/dev/null | "$TESTDIR/filterpyflakes.py"