diff options
author | Paul McGuire <ptmcg@austin.rr.com> | 2019-07-20 13:44:16 -0500 |
---|---|---|
committer | Paul McGuire <ptmcg@austin.rr.com> | 2019-07-20 13:44:16 -0500 |
commit | 07d82bb767d75a0a30bd6f806938c1f9fe50d8ee (patch) | |
tree | fcb1e297f3191111638df627bf657b90b2191c77 /unitTests.py | |
parent | a6203b170a61bd4da24388fb14f83df481159981 (diff) | |
download | pyparsing-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.py | 4 |
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): |