Skip to content

Commit 35e663c

Browse files
committed
Check parse errors.
1 parent 2619bda commit 35e663c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tests/test_parser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
pass
6161

6262
#Run the parse error checks
63-
checkParseErrors = False
63+
checkParseErrors = True
6464

6565
#XXX - There should just be one function here but for some reason the testcase
6666
#format differs from the treedump format by a single space character
@@ -112,8 +112,8 @@ def runParserTest(self, innerHTML, input, expected, errors, treeClass,
112112
errorMsg = "\n".join(["\n\nInput:", input, "\nExpected:", expected,
113113
"\nReceived:", output])
114114
self.assertEquals(expected, output, errorMsg.encode("utf-8"))
115-
errStr = [u"Line: %i Col: %i %s %s"%(line, col,
116-
constants.E[errorcode], datavars) for
115+
errStr = [u"Line: %i Col: %i %s"%(line, col,
116+
constants.E[errorcode] % datavars if isinstance(datavars, dict) else (datavars,)) for
117117
((line,col), errorcode, datavars) in p.errors]
118118

119119
errorMsg2 = u"\n".join([u"\n\nInput:", input,

0 commit comments

Comments
 (0)