summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2016-11-14 11:38:43 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2016-11-14 11:38:43 (GMT)
commit8bf43e6d0b3dc5d76e9d99656528ccdcd5dd6e6a (patch)
treeba1943bfc57cc50f84bf2ab0a42eb12deb8e9c8f /Lib/test
parentfb6a6596b53e7ecf89e36073661eaf556ca4822e (diff)
downloadcpython-8bf43e6d0b3dc5d76e9d99656528ccdcd5dd6e6a.zip
cpython-8bf43e6d0b3dc5d76e9d99656528ccdcd5dd6e6a.tar.gz
cpython-8bf43e6d0b3dc5d76e9d99656528ccdcd5dd6e6a.tar.bz2
Issue #28082: Add basic unit tests on re enums
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_re.py6
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):