Commit a414f57e authored by Victor Stinner's avatar Victor Stinner

Issue #28082: Add basic unit tests on re enums

parent 4b2b7387
......@@ -1771,6 +1771,12 @@ SUBPATTERN None 0 0
self.checkPatternError(r'(?<>)', 'unknown extension ?<>', 1)
self.checkPatternError(r'(?', 'unexpected end of pattern', 2)
def test_enum(self):
# Issue #28082: Check that str(flag) returns a human readable string
# instead of an integer
self.assertIn('ASCII', str(re.A))
self.assertIn('DOTALL', str(re.S))
class PatternReprTests(unittest.TestCase):
def check(self, pattern, expected):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment