diff options
author | David Beazley <dave@dabeaz.com> | 2013-05-21 21:26:59 -0500 |
---|---|---|
committer | David Beazley <dave@dabeaz.com> | 2013-05-21 21:26:59 -0500 |
commit | ee3bb4177786ea343c57208528cc4b5d0cf46918 (patch) | |
tree | 6b06ad4e3c06baeade96c883ec2e3541593f9cbb /test/testyacc.py | |
parent | b708602696f1977a016cca3c6d59110fb77f34fe (diff) | |
download | ply-ee3bb4177786ea343c57208528cc4b5d0cf46918.tar.gz |
More test fixes
Diffstat (limited to 'test/testyacc.py')
-rw-r--r-- | test/testyacc.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/testyacc.py b/test/testyacc.py index 4329d3b..c284444 100644 --- a/test/testyacc.py +++ b/test/testyacc.py @@ -9,6 +9,7 @@ except ImportError: import sys import os import warnings +import re sys.path.insert(0,"..") sys.tracebacklimit = 0 @@ -57,6 +58,10 @@ def check_expected(result,expected): # some variations in error message order that occurs due to dict hash table # randomization that was introduced in Python 3.3 def check_expected(result, expected): + # Normalize 'state n' text to account for randomization effects in Python 3.3 + expected = re.sub(r' state \d+', 'state <n>', expected) + result = re.sub(r' state \d+', 'state <n>', result) + resultlines = set() for line in result.splitlines(): if line.startswith("WARNING: "): |