# HG changeset patch # User Gregory Szorc # Date 2020-03-28 16:21:46 # Node ID 51ffb2a6c08a7e525a573932d37a35db93199170 # Parent bc847878f4c0a2d898d5dec759b4d7706c7cd380 tests: pass str to matchoutput() 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? Differential Revision: https://phab.mercurial-scm.org/D8334 diff --git a/tests/hghave.py b/tests/hghave.py --- a/tests/hghave.py +++ b/tests/hghave.py @@ -335,7 +335,7 @@ def has_hg_range(v): @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: