Skip to content

Commit

Permalink
FIX: Escape regex
Browse files Browse the repository at this point in the history
  • Loading branch information
larsoner committed Aug 15, 2019
1 parent 9abd44f commit 8865fce
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions mayavi/tests/runtests.py
Expand Up @@ -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))

Expand Down

0 comments on commit 8865fce

Please sign in to comment.