tests/test-check-flake8.t
author Anton Shestakov <av6@dwimlabs.net>
Tue, 24 Dec 2019 23:31:42 +0700
branchmercurial-4.5
changeset 5037 5ea7c807d094
parent 3390 b3dbba6e34c9
permissions -rw-r--r--
heptapod-ci: skip test-evolve.t in tests-py2-pure job It seems pure mode on Mercurial 4.5 was broken in case of this test. The error was: Traceback (most recent call last): File "/tmp/hgtests.YoK65c/install/bin/hg", line 41, in <module> dispatch.run() File "/tmp/hgtests.YoK65c/install/lib/python/mercurial/dispatch.py", line 88, in run status = (dispatch(req) or 0) & 255 File "/tmp/hgtests.YoK65c/install/lib/python/mercurial/dispatch.py", line 183, in dispatch ret = _runcatch(req) File "/tmp/hgtests.YoK65c/install/lib/python/mercurial/dispatch.py", line 324, in _runcatch return _callcatch(ui, _runcatchfunc) File "/tmp/hgtests.YoK65c/install/lib/python/mercurial/dispatch.py", line 332, in _callcatch return scmutil.callcatch(ui, func) File "/tmp/hgtests.YoK65c/install/lib/python/mercurial/scmutil.py", line 154, in callcatch return func() File "/tmp/hgtests.YoK65c/install/lib/python/mercurial/dispatch.py", line 314, in _runcatchfunc return _dispatch(req) File "/tmp/hgtests.YoK65c/install/lib/python/mercurial/dispatch.py", line 918, in _dispatch cmdpats, cmdoptions) File "/tmp/hgtests.YoK65c/install/lib/python/mercurial/dispatch.py", line 673, in runcommand ret = _runcommand(ui, options, cmd, d) File "/tmp/hgtests.YoK65c/install/lib/python/mercurial/dispatch.py", line 926, in _runcommand return cmdfunc() File "/tmp/hgtests.YoK65c/install/lib/python/mercurial/dispatch.py", line 915, in <lambda> d = lambda: util.checksignature(func)(ui, *args, **strcmdopt) File "/tmp/hgtests.YoK65c/install/lib/python/mercurial/util.py", line 1195, in check return func(*args, **kwargs) File "/builds/mercurial/evolve/hgext3rd/evolve/evolvecmd.py", line 1603, in evolve return _performevolve(ui, repo, **opts) File "/builds/mercurial/evolve/hgext3rd/evolve/evolvecmd.py", line 1726, in _performevolve targetcat, lastsolved) File "/builds/mercurial/evolve/hgext3rd/evolve/evolvecmd.py", line 1752, in _solveonerev lastsolved=lastsolved, stacktmplt=stacktmplt) File "/builds/mercurial/evolve/hgext3rd/evolve/evolvecmd.py", line 80, in _solveone lastsolved=lastsolved) File "/builds/mercurial/evolve/hgext3rd/evolve/evolvecmd.py", line 183, in _solveunstable keepbranch, b'orphan') File "/builds/mercurial/evolve/hgext3rd/evolve/evolvecmd.py", line 952, in relocate fullnode = unfi.changelog.index.partialmatch(sha1) AttributeError: 'InlinedIndexObject' object has no attribute 'partialmatch'
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2038
a4b09789117a tests: split pyflake and flake8 tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2037
diff changeset
     1
#require test-repo
a4b09789117a tests: split pyflake and flake8 tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2037
diff changeset
     2
a4b09789117a tests: split pyflake and flake8 tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2037
diff changeset
     3
  $ checkflake8() {
a4b09789117a tests: split pyflake and flake8 tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2037
diff changeset
     4
  >   if ! (which flake8 > /dev/null); then
a4b09789117a tests: split pyflake and flake8 tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2037
diff changeset
     5
  >     echo skipped: missing tool: flake8;
a4b09789117a tests: split pyflake and flake8 tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2037
diff changeset
     6
  >     exit 80;
a4b09789117a tests: split pyflake and flake8 tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2037
diff changeset
     7
  >   fi;
a4b09789117a tests: split pyflake and flake8 tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2037
diff changeset
     8
  > };
a4b09789117a tests: split pyflake and flake8 tests
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2037
diff changeset
     9
  $ checkflake8
1930
b82769fd703b tests: add pyflakes test
Sean Farley <sean@farley.io>
parents:
diff changeset
    10
b82769fd703b tests: add pyflakes test
Sean Farley <sean@farley.io>
parents:
diff changeset
    11
Copied from Mercurial core (60ee2593a270)
b82769fd703b tests: add pyflakes test
Sean Farley <sean@farley.io>
parents:
diff changeset
    12
b82769fd703b tests: add pyflakes test
Sean Farley <sean@farley.io>
parents:
diff changeset
    13
  $ cd "`dirname "$TESTDIR"`"
b82769fd703b tests: add pyflakes test
Sean Farley <sean@farley.io>
parents:
diff changeset
    14
2002
053190199959 tests: add flake8 check
Sean Farley <sean@farley.io>
parents: 1930
diff changeset
    15
run flake8 if it exists; if it doesn't, then just skip
053190199959 tests: add flake8 check
Sean Farley <sean@farley.io>
parents: 1930
diff changeset
    16
3390
b3dbba6e34c9 evolve: start vendoring third party package cbor
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2121
diff changeset
    17
  $ hg files -0 'set:(**.py or grep("^#!.*python")) - removed()' \
b3dbba6e34c9 evolve: start vendoring third party package cbor
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2121
diff changeset
    18
  > -X hgext3rd/evolve/thirdparty \
b3dbba6e34c9 evolve: start vendoring third party package cbor
Pulkit Goyal <7895pulkit@gmail.com>
parents: 2121
diff changeset
    19
  > 2>/dev/null \
2108
206066375dcb checks: update pyflakes matching too
Pierre-Yves David <pierre-yves.david@ens-lyon.org>
parents: 2038
diff changeset
    20
  > | xargs -0 flake8