diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2016-11-14 11:38:43 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2016-11-14 11:38:43 (GMT) |
commit | 8bf43e6d0b3dc5d76e9d99656528ccdcd5dd6e6a (patch) | |
tree | ba1943bfc57cc50f84bf2ab0a42eb12deb8e9c8f /Lib | |
parent | fb6a6596b53e7ecf89e36073661eaf556ca4822e (diff) | |
download | cpython-8bf43e6d0b3dc5d76e9d99656528ccdcd5dd6e6a.zip cpython-8bf43e6d0b3dc5d76e9d99656528ccdcd5dd6e6a.tar.gz cpython-8bf43e6d0b3dc5d76e9d99656528ccdcd5dd6e6a.tar.bz2 |
Issue #28082: Add basic unit tests on re enums
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_re.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index 3bd6d7b..aac3a2c 100644 --- a/Lib/test/test_re.py +++ b/Lib/test/test_re.py @@ -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): |