summaryrefslogtreecommitdiff
path: root/pyparsing.py
diff options
context:
space:
mode:
authorPaul McGuire <ptmcg@austin.rr.com>2018-12-21 18:53:35 -0600
committerPaul McGuire <ptmcg@austin.rr.com>2018-12-21 18:53:35 -0600
commitaf436afac04288222cfc5539888d3f2a462070a1 (patch)
tree095ddbeb97a1296d25c0f966ff6827af1a875f4e /pyparsing.py
parente1ee379b3a52632d4fa419d199780349e831470b (diff)
downloadpyparsing-git-af436afac04288222cfc5539888d3f2a462070a1.tar.gz
Fix postParse bug introduced in runTests; extended cleanup of unitTests (convert bare asserts to TestCase.assertTrue and assertEqual; remove trailing spaces throughout)
Diffstat (limited to 'pyparsing.py')
-rw-r--r--pyparsing.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pyparsing.py b/pyparsing.py
index ed1b748..59735a0 100644
--- a/pyparsing.py
+++ b/pyparsing.py
@@ -2453,11 +2453,11 @@ class ParserElement(object):
result = self.parseString(t, parseAll=parseAll)
out.append(result.dump(full=fullDump))
success = success and not failureTests
- if post_parse is not None:
+ if postParse is not None:
try:
- out.append(post_parse(t, result))
+ out.append(postParse(t, result))
except Exception as e:
- out.append("{} failed: {}: {}".format(post_parse.__name__, type(e).__name__, e))
+ out.append("{} failed: {}: {}".format(postParse.__name__, type(e).__name__, e))
except ParseBaseException as pe:
fatal = "(FATAL)" if isinstance(pe, ParseFatalException) else ""
if '\n' in t: