Commit a1e01b61 authored by Ben Gamari's avatar Ben Gamari Committed by Ben Gamari

testlib: Make TyCon normalization Python 2.6-compatible

D1629 introduced this normalization which was not Python 2.6 compatible
due to the use of the `flags` argument of `re.sub`. Fix this.

Test Plan: Validate

Reviewers: austin, thomie

Differential Revision:
parent fcc76493
......@@ -1697,12 +1697,11 @@ def normalise_callstacks(str):
# Ignore line number differences in call stacks (#10834).
return re.sub(', called at (.+):[\\d]+:[\\d]+ in [\\w\-\.]+:', repl, str)
tyCon_re = re.compile(r'TyCon\s*\d+L?\#\#\s*\d+L?\#\#\s*', flags=re.MULTILINE)
def normalise_type_reps(str):
""" Normalise out fingerprints from Typeable TyCon representations """
return re.sub(r'TyCon\s*\d+L?\#\#\s*\d+L?\#\#\s*',
return re.sub(tyCon_re, 'TyCon FINGERPRINT FINGERPRINT ', str)
def normalise_errmsg( str ):
# remove " error:" and lower-case " Warning:" to make patch for
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment