tests/test-check-pyflakes.t
author Pierre-Yves David <pierre-yves.david@octobus.net>
Tue, 09 Apr 2024 22:37:15 +0200
changeset 51595 3a6fae3bef35
parent 49283 44b26349127b
permissions -rw-r--r--
outgoing: add a simple fastpath when there is no common This further speed up case like `hg bundle --all` for larger repository. ### data-env-vars.name = mozilla-try-2023-03-22-zstd-sparse-revlog # benchmark.name = hg.command.bundle # bin-env-vars.hg.flavor = default # bin-env-vars.hg.py-re2-module = default # benchmark.variants.revs = all # benchmark.variants.type = none-streamv2 before: 316.749699 after: 311.165461 (-1.76%, -5.58) There is further work to be done in this area like not doing any outgoing computation in the stream case for example. however the recent changes already gives use a large win for a small amount of local work. ### benchmark.name = hg.command.bundle # bin-env-vars.hg.flavor = default # bin-env-vars.hg.py-re2-module = default # benchmark.variants.revs = all # benchmark.variants.type = none-streamv2 ## data-env-vars.name = mercurial-public-2024-03-22-zstd-sparse-revlog pre-%ln-change: 1.263859 the-%ln-change: 0.700229 (-44.60%, -0.56) prev-changeset: 0.496050 (-60.75%, -0.77) this-changeset: 0.495243 (-60.81%, -0.77) ## data-env-vars.name = tryton-public-2024-03-22-zstd-sparse-revlog pre-%ln-change: 2.975765 the-%ln-change: 1.870798 (-37.13%, -1.10) prev-changeset: 1.461583 (-50.88%, -1.51) this-changeset: 1.469185 (-50.63%, -1.51) ## data-env-vars.name = pypy-2024-03-22-zstd-sparse-revlog pre-%ln-change: 4.540080 the-%ln-change: 3.401700 (-25.07%, -1.14) prev-changeset: 2.915810 (-35.78%, -1.62) this-changeset: 2.911643 (-35.87%, -1.63) ## data-env-vars.name = heptapod-public-2024-03-25-zstd-sparse-revlog pre-%ln-change: 10.138396 the-%ln-change: 7.750458 (-23.55%, -2.39) prev-changeset: 6.665565 (-34.25%, -3.47) this-changeset: 6.672078 (-34.19%, -3.47) ## data-env-vars.name = mozilla-try-2023-03-22-zstd-sparse-revlog pre-%ln-change: 399.484481 the-%ln-change: 346.508952 (-13.26%, -52.98) prev-changeset: 316.749699 (-20.71%, -82.73) this-changeset: 311.165461 (-22.11%, -88.32)
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
29138
a29f071751df tests: mark test-check-pyflakes.t as requiring hg1.0+
timeless <timeless@mozdev.org>
parents: 27285
diff changeset
     1
#require test-repo pyflakes hg10
21208
0e1cbd3d52f7 tests: add repository check for pyflakes test
Matt Mackall <mpm@selenic.com>
parents: 20644
diff changeset
     2
29219
3c9066ed557c tests: silence test-repo obsolete warning
timeless <timeless@mozdev.org>
parents: 29138
diff changeset
     3
  $ . "$TESTDIR/helpers-testrepo.sh"
19377
0cb996ee8c6d tests: run pyflakes on files from manifest which could be python files
Simon Heimberg <simohe@besonet.ch>
parents: 16350
diff changeset
     4
0cb996ee8c6d tests: run pyflakes on files from manifest which could be python files
Simon Heimberg <simohe@besonet.ch>
parents: 16350
diff changeset
     5
run pyflakes on all tracked files ending in .py or without a file ending
0cb996ee8c6d tests: run pyflakes on files from manifest which could be python files
Simon Heimberg <simohe@besonet.ch>
parents: 16350
diff changeset
     6
(skipping binary file random-seed)
21208
0e1cbd3d52f7 tests: add repository check for pyflakes test
Matt Mackall <mpm@selenic.com>
parents: 20644
diff changeset
     7
33367
6029939f7e98 filterpyflakes: move self-test into test file
Augie Fackler <raf@durin42.com>
parents: 33204
diff changeset
     8
  $ cat > test.py <<EOF
6029939f7e98 filterpyflakes: move self-test into test file
Augie Fackler <raf@durin42.com>
parents: 33204
diff changeset
     9
  > print(undefinedname)
6029939f7e98 filterpyflakes: move self-test into test file
Augie Fackler <raf@durin42.com>
parents: 33204
diff changeset
    10
  > EOF
47063
1d075b857c90 tests: ensure `$PYTHON` is quoted for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 44960
diff changeset
    11
  $ "$PYTHON" -m pyflakes test.py 2>/dev/null | "$TESTDIR/filterpyflakes.py"
44959
170f8a43b5b8 tests: adjust to the new format in pyflakes output
Anton Shestakov <av6@dwimlabs.net>
parents: 44958
diff changeset
    12
  test.py:1:* undefined name 'undefinedname' (glob)
33367
6029939f7e98 filterpyflakes: move self-test into test file
Augie Fackler <raf@durin42.com>
parents: 33204
diff changeset
    13
  
33418
1f3b54f392b0 test-check-pyflakes: do not leave test.py in the repo
Jun Wu <quark@fb.com>
parents: 33367
diff changeset
    14
  $ cd "`dirname "$TESTDIR"`"
33367
6029939f7e98 filterpyflakes: move self-test into test file
Augie Fackler <raf@durin42.com>
parents: 33204
diff changeset
    15
33204
ddd65b4f3ae6 tests: alias syshg and syshgenv so they can be switched conditionally
Yuya Nishihara <yuya@tcha.org>
parents: 33116
diff changeset
    16
  $ testrepohg locate 'set:**.py or grep("^#!.*python")' \
33116
6c113a7dec52 tests: use the system hg for examining the local repository
Adam Simpkins <simpkins@fb.com>
parents: 32510
diff changeset
    17
  > -X hgext/fsmonitor/pywatchman \
48997
20c6c9e43397 tests: stop excluding the pycompat module from pyflakes
Matt Harbison <matt_harbison@yahoo.com>
parents: 48996
diff changeset
    18
  > -X contrib/python-zstandard \
44957
1ca0d5cae9bc tests: skip pyflakes for mercurial/thirdparty/
Anton Shestakov <av6@dwimlabs.net>
parents: 44461
diff changeset
    19
  > -X mercurial/thirdparty \
29584
06587edd1233 pycompat: make pycompat demandimport friendly
Pulkit Goyal <7895pulkit@gmail.com>
parents: 29232
diff changeset
    20
  > 2>/dev/null \
47063
1d075b857c90 tests: ensure `$PYTHON` is quoted for Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 44960
diff changeset
    21
  > | xargs "$PYTHON" -m pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
44959
170f8a43b5b8 tests: adjust to the new format in pyflakes output
Anton Shestakov <av6@dwimlabs.net>
parents: 44958
diff changeset
    22
  contrib/perf.py:*:* undefined name 'xrange' (glob) (?)
48997
20c6c9e43397 tests: stop excluding the pycompat module from pyflakes
Matt Harbison <matt_harbison@yahoo.com>
parents: 48996
diff changeset
    23
  mercurial/pycompat.py:*:* 'codecs' imported but unused (glob)
20c6c9e43397 tests: stop excluding the pycompat module from pyflakes
Matt Harbison <matt_harbison@yahoo.com>
parents: 48996
diff changeset
    24
  mercurial/pycompat.py:*:* 'concurrent.futures' imported but unused (glob)
20c6c9e43397 tests: stop excluding the pycompat module from pyflakes
Matt Harbison <matt_harbison@yahoo.com>
parents: 48996
diff changeset
    25
  mercurial/pycompat.py:*:* 'http.client as httplib' imported but unused (glob)
20c6c9e43397 tests: stop excluding the pycompat module from pyflakes
Matt Harbison <matt_harbison@yahoo.com>
parents: 48996
diff changeset
    26
  mercurial/pycompat.py:*:* 'http.cookiejar as cookielib' imported but unused (glob)
20c6c9e43397 tests: stop excluding the pycompat module from pyflakes
Matt Harbison <matt_harbison@yahoo.com>
parents: 48996
diff changeset
    27
  mercurial/pycompat.py:*:* 'io' imported but unused (glob)
20c6c9e43397 tests: stop excluding the pycompat module from pyflakes
Matt Harbison <matt_harbison@yahoo.com>
parents: 48996
diff changeset
    28
  mercurial/pycompat.py:*:* 'queue' imported but unused (glob)
20c6c9e43397 tests: stop excluding the pycompat module from pyflakes
Matt Harbison <matt_harbison@yahoo.com>
parents: 48996
diff changeset
    29
  mercurial/pycompat.py:*:* 'socketserver' imported but unused (glob)
20c6c9e43397 tests: stop excluding the pycompat module from pyflakes
Matt Harbison <matt_harbison@yahoo.com>
parents: 48996
diff changeset
    30
  mercurial/pycompat.py:*:* 'xmlrpc.client as xmlrpclib' imported but unused (glob)
48993
225659936fff util: restore the util.pickle symbol
Matt Harbison <matt_harbison@yahoo.com>
parents: 47181
diff changeset
    31
  mercurial/util.py:*:* 'pickle' imported but unused (glob)
22053
4354b1e35f53 tests: fix pyflakes test whitespace breakage
Matt Mackall <mpm@selenic.com>
parents: 22047
diff changeset
    32