D5828: tests: use raw strings for regular expressions with escapes
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Mon Feb 4 17:42:47 UTC 2019
indygreg created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.
REVISION SUMMARY
Avoids SyntaxWarning on Python 3.8.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D5828
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
@@ -722,15 +722,15 @@
@check("clang-libfuzzer", "clang new enough to include libfuzzer")
def has_clang_libfuzzer():
- mat = matchoutput('clang --version', b'clang version (\d)')
+ mat = matchoutput('clang --version', br'clang version (\d)')
if mat:
# libfuzzer is new in clang 6
return int(mat.group(1)) > 5
return False
@check("clang-6.0", "clang 6.0 with version suffix (libfuzzer included)")
def has_clang60():
- return matchoutput('clang-6.0 --version', b'clang version 6\.')
+ return matchoutput('clang-6.0 --version', br'clang version 6\.')
@check("xdiff", "xdiff algorithm")
def has_xdiff():
@@ -811,7 +811,7 @@
# WITH clause not supported
return False
- return matchoutput('sqlite3 -version', b'^3\.\d+')
+ return matchoutput('sqlite3 -version', br'^3\.\d+')
@check('vcr', 'vcr http mocking library')
def has_vcr():
To: indygreg, #hg-reviewers
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list