summaryrefslogtreecommitdiff
path: root/unitTests.py
diff options
context:
space:
mode:
authorPaul McGuire <ptmcg@austin.rr.com>2019-07-20 13:44:16 -0500
committerPaul McGuire <ptmcg@austin.rr.com>2019-07-20 13:44:16 -0500
commit07d82bb767d75a0a30bd6f806938c1f9fe50d8ee (patch)
treefcb1e297f3191111638df627bf657b90b2191c77 /unitTests.py
parenta6203b170a61bd4da24388fb14f83df481159981 (diff)
downloadpyparsing-git-07d82bb767d75a0a30bd6f806938c1f9fe50d8ee.tar.gz
Fix latent bug if adding a parse action after having cleared parse actions with Nonepyparsing_2.4.1
Diffstat (limited to 'unitTests.py')
-rw-r--r--unitTests.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/unitTests.py b/unitTests.py
index 0c1ebee..7bfbe52 100644
--- a/unitTests.py
+++ b/unitTests.py
@@ -3180,6 +3180,10 @@ class ClearParseActionsTest(ParseTestCase):
realnum.setParseAction(None)
self.assertEqual(realnum.parseString("3.14159")[0], "3.14159", "failed clearing parse action")
+ # add a new parse action that tests if a '.' is prsent
+ realnum.addParseAction(lambda t: '.' in t[0])
+ self.assertEqual(realnum.parseString("3.14159")[0], True,
+ "failed setting new parse action after clearing parse action")
class OneOrMoreStopTest(ParseTestCase):
def runTest(self):