mirror of https://github.com/python/cpython
Issue #28082: Add basic unit tests on re enums
This commit is contained in:
parent
fb6a6596b5
commit
8bf43e6d0b
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue