##// END OF EJS Templates
hgweb: remove dead code handling UnicodeDecodeError...
hgweb: remove dead code handling UnicodeDecodeError I’m quite confident that the error can’t happen on Python 3, as the main motivation for separating bytes and str in Python 3 was to avoid this class of errors.

File last commit:

r50178:44b26349 default
r50178:44b26349 default
Show More
test-check-pyflakes.t
32 lines | 1.3 KiB | text/troff | Tads3Lexer
/ tests / test-check-pyflakes.t
#require test-repo pyflakes hg10
$ . "$TESTDIR/helpers-testrepo.sh"
run pyflakes on all tracked files ending in .py or without a file ending
(skipping binary file random-seed)
$ cat > test.py <<EOF
> print(undefinedname)
> EOF
$ "$PYTHON" -m pyflakes test.py 2>/dev/null | "$TESTDIR/filterpyflakes.py"
test.py:1:* undefined name 'undefinedname' (glob)
$ cd "`dirname "$TESTDIR"`"
$ testrepohg locate 'set:**.py or grep("^#!.*python")' \
> -X hgext/fsmonitor/pywatchman \
> -X contrib/python-zstandard \
> -X mercurial/thirdparty \
> 2>/dev/null \
> | xargs "$PYTHON" -m pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
contrib/perf.py:*:* undefined name 'xrange' (glob) (?)
mercurial/pycompat.py:*:* 'codecs' imported but unused (glob)
mercurial/pycompat.py:*:* 'concurrent.futures' imported but unused (glob)
mercurial/pycompat.py:*:* 'http.client as httplib' imported but unused (glob)
mercurial/pycompat.py:*:* 'http.cookiejar as cookielib' imported but unused (glob)
mercurial/pycompat.py:*:* 'io' imported but unused (glob)
mercurial/pycompat.py:*:* 'queue' imported but unused (glob)
mercurial/pycompat.py:*:* 'socketserver' imported but unused (glob)
mercurial/pycompat.py:*:* 'xmlrpc.client as xmlrpclib' imported but unused (glob)
mercurial/util.py:*:* 'pickle' imported but unused (glob)