D8334: tests: pass str to matchoutput()

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

D8334: tests: pass str to matchoutput()

valentin.gatienbaron (Valentin Gatien-Baron)
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REVISION SUMMARY
  It accepts a str, not bytes.
 
  This fixes a failure in test-hghave.t on Windows. Why it
  wasn't failing on Linux, I don't know. I suspect the Windows
  process code in Python doesn't accept bytes and the POSIX code
  does?

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

AFFECTED FILES
  tests/hghave.py

CHANGE DETAILS

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -335,7 +335,7 @@
 @check("rust", "Using the Rust extensions")
 def has_rust():
     """Check is the mercurial currently running is using some rust code"""
-    cmd = b'hg debuginstall --quiet 2>&1'
+    cmd = 'hg debuginstall --quiet 2>&1'
     match = br'checking module policy \(([^)]+)\)'
     policy = matchoutput(cmd, match)
     if not policy:



To: indygreg, #hg-reviewers
Cc: mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

D8334: tests: pass str to matchoutput()

valentin.gatienbaron (Valentin Gatien-Baron)
mharbison72 added a comment.
mharbison72 accepted this revision.


  > I suspect the Windows process code in Python doesn't accept bytes and the POSIX code does?
 
  That's definitely my experience, and the reason for `procutil.tonativestr()`.

REPOSITORY
  rHG Mercurial

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

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

To: indygreg, #hg-reviewers, mharbison72
Cc: mharbison72, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Reply | Threaded
Open this post in threaded view
|

D8334: tests: pass str to matchoutput()

valentin.gatienbaron (Valentin Gatien-Baron)
In reply to this post by valentin.gatienbaron (Valentin Gatien-Baron)
Closed by commit rHG51ffb2a6c08a: tests: pass str to matchoutput() (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/D8334?vs=20900&id=20939

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

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

AFFECTED FILES
  tests/hghave.py

CHANGE DETAILS

diff --git a/tests/hghave.py b/tests/hghave.py
--- a/tests/hghave.py
+++ b/tests/hghave.py
@@ -335,7 +335,7 @@
 @check("rust", "Using the Rust extensions")
 def has_rust():
     """Check is the mercurial currently running is using some rust code"""
-    cmd = b'hg debuginstall --quiet 2>&1'
+    cmd = 'hg debuginstall --quiet 2>&1'
     match = br'checking module policy \(([^)]+)\)'
     policy = matchoutput(cmd, match)
     if not policy:



To: indygreg, #hg-reviewers, mharbison72, pulkit
Cc: mharbison72, mercurial-devel
_______________________________________________
Mercurial-devel mailing list
[hidden email]
https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel