From: Victor Stinner Date: Mon, 14 Nov 2016 11:38:43 +0000 (+0100) Subject: Issue #28082: Add basic unit tests on re enums X-Git-Tag: v3.6.0b4~86 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8bf43e6d0b3dc5d76e9d99656528ccdcd5dd6e6a;p=thirdparty%2FPython%2Fcpython.git Issue #28082: Add basic unit tests on re enums --- diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index 3bd6d7b461cb..aac3a2cbab48 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):