tests/test-check-format.t
author Matt Harbison <matt_harbison@yahoo.com>
Wed, 23 Oct 2024 16:59:43 -0400
changeset 52076 66579606f677
parent 51919 ceaf92d6d380
permissions -rw-r--r--
localrepo: drop the CamelCase name for `localrepo.localpeer` See 61557734c0ae for the reasoning.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
45389
f62bb5d07848 test: add `test-repo` requirement to `test-check-format` (issue6395)
Pierre-Yves David <pierre-yves.david@octobus.net>
parents: 44147
diff changeset
     1
#require black test-repo
43095
fb41ea2ea076 formatting: introduce a `test-check-format-black.t` that enforce formatting
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
     2
46870
41d43d12c2c4 tests: restore the ability to run `black` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 46774
diff changeset
     3
Black needs the real USERPROFILE in order to run on Windows
41d43d12c2c4 tests: restore the ability to run `black` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 46774
diff changeset
     4
#if msys
41d43d12c2c4 tests: restore the ability to run `black` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 46774
diff changeset
     5
  $ USERPROFILE="$REALUSERPROFILE"
41d43d12c2c4 tests: restore the ability to run `black` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 46774
diff changeset
     6
  $ export USERPROFILE
41d43d12c2c4 tests: restore the ability to run `black` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 46774
diff changeset
     7
#endif
41d43d12c2c4 tests: restore the ability to run `black` on Windows
Matt Harbison <matt_harbison@yahoo.com>
parents: 46774
diff changeset
     8
51919
ceaf92d6d380 tests: always access the mercurial repo through `helpers-testrepo.sh`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 46870
diff changeset
     9
  $ . "$TESTDIR/helpers-testrepo.sh"
ceaf92d6d380 tests: always access the mercurial repo through `helpers-testrepo.sh`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 46870
diff changeset
    10
43095
fb41ea2ea076 formatting: introduce a `test-check-format-black.t` that enforce formatting
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    11
  $ cd $RUNTESTDIR/..
51919
ceaf92d6d380 tests: always access the mercurial repo through `helpers-testrepo.sh`
Arseniy Alekseyev <aalekseyev@janestreet.com>
parents: 46870
diff changeset
    12
  $ black --check --diff `testrepohg files 'set:(**.py + grep("^#!.*python")) - mercurial/thirdparty/**'`
43095
fb41ea2ea076 formatting: introduce a `test-check-format-black.t` that enforce formatting
Pierre-Yves David <pierre-yves.david@octobus.net>
parents:
diff changeset
    13