diff options
author | Paul McGuire <ptmcg@users.noreply.github.com> | 2022-02-05 22:23:39 -0600 |
---|---|---|
committer | Paul McGuire <ptmcg@users.noreply.github.com> | 2022-02-05 22:23:39 -0600 |
commit | 1a39f1133dfff410c9fea1a948a0f60ac660d30f (patch) | |
tree | 718ab8c3f2ffc47715aae5ef47b0cc3b234ecbcf /tests | |
parent | 5a411e33b62825289a73c74e071862f6f129cb64 (diff) | |
download | pyparsing-git-1a39f1133dfff410c9fea1a948a0f60ac660d30f.tar.gz |
Update CHANGES and timestamp from #362; fix related unit test and ValueError message
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_unit.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_unit.py b/tests/test_unit.py index 72b1095..629e3a1 100644 --- a/tests/test_unit.py +++ b/tests/test_unit.py @@ -3487,7 +3487,7 @@ class Test02_WithoutPackrat(ppt.TestParseResultsAsserts, TestCase): try: print("lets try an invalid RE") invRe = pp.Regex("(\"[^\"]*\")|('[^']*'").re - except Exception as e: + except ValueError as e: print("successfully rejected an invalid RE:", end=" ") print(e) else: @@ -3496,7 +3496,7 @@ class Test02_WithoutPackrat(ppt.TestParseResultsAsserts, TestCase): with self.assertRaises( ValueError, msg="failed to warn empty string passed to Regex" ): - invRe = pp.Regex("") + pp.Regex("").re def testRegexAsType(self): |