Skip to content

Commit 8561628

Browse files
author
Erlend E. Aasland
committed
Test that MAXREPEAT and MAXGROUPS are unsigned
1 parent ab13ae6 commit 8561628

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Lib/test/test_re.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2197,6 +2197,10 @@ def test_overlap_table(self):
21972197
self.assertEqual(f("ababba"), [0, 0, 1, 2, 0, 1])
21982198
self.assertEqual(f("abcabdac"), [0, 0, 0, 1, 2, 0, 1, 0])
21992199

2200+
def test_signedness(self):
2201+
self.assertGreaterEqual(sre_compile.MAXREPEAT, 0)
2202+
self.assertGreaterEqual(sre_compile.MAXGROUPS, 0)
2203+
22002204

22012205
class ExternalTests(unittest.TestCase):
22022206

0 commit comments

Comments
 (0)