Mercurial > hg
comparison tests/test-check-pyflakes.t @ 44959:170f8a43b5b8 stable
tests: adjust to the new format in pyflakes output
According to the pyflakes' NEWS.rst, the default output format changed
recently:
2.2.0 (2020-04-08)
- Include column information in error messages
So the lines now read:
contrib/perf.py:149:15 undefined name 'xrange'
mercurial/hgweb/server.py:427:13 undefined name 'reload'
mercurial/util.py:2862:24 undefined name 'file'
This is a graft of a similar fix that ended up on default.
Differential Revision: https://phab.mercurial-scm.org/D8630
author | Anton Shestakov <av6@dwimlabs.net> |
---|---|
date | Sat, 06 Jun 2020 19:15:11 +0800 |
parents | f9099e210c57 |
children | 78cafd48b9b2 |
comparison
equal
deleted
inserted
replaced
44958:f9099e210c57 | 44959:170f8a43b5b8 |
---|---|
7 | 7 |
8 $ cat > test.py <<EOF | 8 $ cat > test.py <<EOF |
9 > print(undefinedname) | 9 > print(undefinedname) |
10 > EOF | 10 > EOF |
11 $ $PYTHON -m pyflakes test.py 2>/dev/null | "$TESTDIR/filterpyflakes.py" | 11 $ $PYTHON -m pyflakes test.py 2>/dev/null | "$TESTDIR/filterpyflakes.py" |
12 test.py:1: undefined name 'undefinedname' | 12 test.py:1:* undefined name 'undefinedname' (glob) |
13 | 13 |
14 $ cd "`dirname "$TESTDIR"`" | 14 $ cd "`dirname "$TESTDIR"`" |
15 | 15 |
16 $ testrepohg locate 'set:**.py or grep("^#!.*python")' \ | 16 $ testrepohg locate 'set:**.py or grep("^#!.*python")' \ |
17 > -X hgext/fsmonitor/pywatchman \ | 17 > -X hgext/fsmonitor/pywatchman \ |
18 > -X mercurial/pycompat.py -X contrib/python-zstandard \ | 18 > -X mercurial/pycompat.py -X contrib/python-zstandard \ |
19 > -X mercurial/thirdparty \ | 19 > -X mercurial/thirdparty \ |
20 > 2>/dev/null \ | 20 > 2>/dev/null \ |
21 > | xargs $PYTHON -m pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py" | 21 > | xargs $PYTHON -m pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py" |
22 contrib/perf.py:*: undefined name 'xrange' (glob) (?) | 22 contrib/perf.py:*:* undefined name 'xrange' (glob) (?) |
23 mercurial/hgweb/server.py:*: undefined name 'reload' (glob) (?) | 23 mercurial/hgweb/server.py:*:* undefined name 'reload' (glob) (?) |
24 mercurial/util.py:*: undefined name 'file' (glob) (?) | 24 mercurial/util.py:*:* undefined name 'file' (glob) (?) |
25 mercurial/encoding.py:*: undefined name 'localstr' (glob) (?) | 25 mercurial/encoding.py:*:* undefined name 'localstr' (glob) (?) |
26 | 26 |