Patchwork D7447: tests: verify that Python scripts are blackened

login
register
mail settings
Submitter phabricator
Date Nov. 18, 2019, 4:51 p.m.
Message ID <ddbfbd48b7dabc3b8bc8d549fa42e2fe@localhost.localdomain>
Download mbox | patch
Permalink /patch/43337/
State Not Applicable
Headers show

Comments

phabricator - Nov. 18, 2019, 4:51 p.m.
Closed by commit rHG2d8d4e08c493: tests: verify that Python scripts are blackened (authored by indygreg).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D7447?vs=18198&id=18215

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7447/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7447

AFFECTED FILES
  tests/test-check-format.t
  tests/test-check-shbang.t

CHANGE DETAILS




To: indygreg, #hg-reviewers, pulkit
Cc: mercurial-devel

Patch

diff --git a/tests/test-check-shbang.t b/tests/test-check-shbang.t
--- a/tests/test-check-shbang.t
+++ b/tests/test-check-shbang.t
@@ -11,6 +11,7 @@ 
 In tests, enforce $PYTHON and *not* /usr/bin/env python or similar:
   $ testrepohg files 'set:grep(r"#!.*?python") and **/*.t' \
   > -X tests/test-check-execute.t \
+  > -X tests/test-check-format.t \
   > -X tests/test-check-module-imports.t \
   > -X tests/test-check-pyflakes.t \
   > -X tests/test-check-shbang.t
diff --git a/tests/test-check-format.t b/tests/test-check-format.t
--- a/tests/test-check-format.t
+++ b/tests/test-check-format.t
@@ -1,5 +1,5 @@ 
 #require black
 
   $ cd $RUNTESTDIR/..
-  $ black --config=black.toml --check --diff `hg files 'set:**.py - mercurial/thirdparty/** - "contrib/python-zstandard/**"'`
+  $ black --config=black.toml --check --diff `hg files 'set:(**.py + grep("^#!.*python")) - mercurial/thirdparty/** - "contrib/python-zstandard/**"'`