From 8865fce6400476e981ffc38dee39f5352742fda5 Mon Sep 17 00:00:00 2001 From: Eric Larson Date: Wed, 14 Aug 2019 21:18:03 -0400 Subject: [PATCH] FIX: Escape regex --- mayavi/tests/runtests.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mayavi/tests/runtests.py b/mayavi/tests/runtests.py index 104818ab8..c3f97377a 100644 --- a/mayavi/tests/runtests.py +++ b/mayavi/tests/runtests.py @@ -121,17 +121,17 @@ def run(tests, verbose=1): out, err = pipe.communicate() # Calculate number of tests run, errors and failures based on output. - res = re.search('Ran\s*(\d*)\s*test', err) + res = re.search(r'Ran\s*(\d*)\s*test', err) nt = 1 if res: nt = int(res.group(1)) total += nt - res = re.search('failures=(\d*)', err) + res = re.search(r'failures=(\d*)', err) nfail = 0 if res: nfail = int(res.group(1)) nerr = 0 - res = re.search('errors=(\d*)', err) + res = re.search(r'errors=(\d*)', err) if res: nerr = int(res.group(1))