Skip to content

Commit a6109ef

Browse files
author
Erlend Egeberg Aasland
authored
bpo-1635741: Convert _sre types to heap types and establish module state (PEP 384) (GH-23393)
1 parent 2db8e35 commit a6109ef

File tree

4 files changed

+374
-483
lines changed

4 files changed

+374
-483
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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Convert _sre module types to heap types (PEP 384). Patch by Erlend E.
2+
Aasland.

0 commit comments

Comments
 (0)