diff options
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): |