summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul McGuire <ptmcg@users.noreply.github.com>2022-02-05 22:23:39 -0600
committerPaul McGuire <ptmcg@users.noreply.github.com>2022-02-05 22:23:39 -0600
commit1a39f1133dfff410c9fea1a948a0f60ac660d30f (patch)
tree718ab8c3f2ffc47715aae5ef47b0cc3b234ecbcf /tests
parent5a411e33b62825289a73c74e071862f6f129cb64 (diff)
downloadpyparsing-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.py4
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):