Patchwork D5828: tests: use raw strings for regular expressions with escapes

login
register
mail settings
Submitter phabricator
Date Feb. 4, 2019, 11:37 p.m.
Message ID <8be6d3576233b59a6045e6d533fbd9e9@localhost.localdomain>
Download mbox | patch
Permalink /patch/38407/
State Not Applicable
Headers show

Comments

phabricator - Feb. 4, 2019, 11:37 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGdddf53473315: tests: use raw strings for regular expressions with escapes (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5828?vs=13755&id=13787

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

AFFECTED FILES
  tests/hghave.py

CHANGE DETAILS




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

Patch

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():