Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e854433 + 1f1888e commit b33941aCopy full SHA for b33941a
1 file changed
Lib/test/test_re.py
@@ -949,10 +949,17 @@ def test_compile(self):
949
# Test behaviour when not given a string or pattern as parameter
950
self.assertRaises(TypeError, re.compile, 0)
951
952
+ @bigmemtest(size=_2G, memuse=1)
953
+ def test_large_search(self, size):
954
+ # Issue #10182: indices were 32-bit-truncated.
955
+ s = 'a' * size
956
+ m = re.search('$', s)
957
+ self.assertIsNotNone(m)
958
+
959
# The huge memuse is because of re.sub() using a list and a join()
960
# to create the replacement result.
- @bigmemtest(size=_2G, memuse=20)
- def test_large(self, size):
961
+ @bigmemtest(size=_2G, memuse=16 + 2)
962
+ def test_large_subn(self, size):
963
# Issue #10182: indices were 32-bit-truncated.
964
s = 'a' * size
965
m = re.search('$', s)
0 commit comments