tests: use raw strings for regular expressions with escapes
Avoids SyntaxWarning on Python 3.8.
Differential Revision: https://phab.mercurial-scm.org/D5828
--- a/tests/hghave.py Mon Feb 04 09:35:55 2019 -0800
+++ b/tests/hghave.py Mon Feb 04 09:37:09 2019 -0800
@@ -722,7 +722,7 @@
@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
@@ -730,7 +730,7 @@
@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():