Patchwork D7080: hghave: use a native string to invoke the `black` command

login
register
mail settings
Submitter phabricator
Date Oct. 13, 2019, 2:31 a.m.
Message ID <differential-rev-PHID-DREV-meu3e7sijkdxyoe5ulnu-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/42282/
State Superseded
Headers show

Comments

phabricator - Oct. 13, 2019, 2:31 a.m.
mharbison72 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  Windows can't create a process based on bytes.  Apparently only the output test
  in `matchoutput` wants bytes.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/hghave.py

CHANGE DETAILS




To: mharbison72, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -984,8 +984,8 @@ 
 @check('grey', 'grey, the fork of the black formatter for python')
 def has_black():
     # use that to actual black as soon as possible
-    # blackcmd = b'black --version'
-    blackcmd = b'python3 $RUNTESTDIR/../contrib/grey.py --version'
+    # blackcmd = 'black --version'
+    blackcmd = 'python3 $RUNTESTDIR/../contrib/grey.py --version'
     # version_regex = b'black, version \d'
     version_regex = b'grey.py, version \d'
     return matchoutput(blackcmd, version_regex)