tests/test-check-flake8.t
author Boris Feld <boris.feld@octobus.net>
Wed, 21 Feb 2018 14:39:48 +0100
changeset 4299 4af0235e7b0b
parent 3390 b3dbba6e34c9
permissions -rw-r--r--
split: take file patterns to limit selection on matching file patterns When splitting a big changeset, the user often wants to extract specific files from the changeset while leaving the others files intact. The split command can now be called with multiple file patterns. Only files that match one of the patterns will be shown in the interactive selection. The user will be able to create one or more commits with those files. When the user finishes splitting the matching files, a last commit will be made with the remaining of the files.
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