MCPcopy Index your code
hub / github.com/python/cpython / test_large_search

Method test_large_search

Lib/test/test_re.py:2049–2055  ·  view source on GitHub ↗
(self, size)

Source from the content-addressed store, hash-verified

2047
2048 @bigmemtest(size=_2G, memuse=1)
2049 def test_large_search(self, size):
2050 # Issue #10182: indices were 32-bit-truncated.
2051 s = 'a' * size
2052 m = re.search('$', s)
2053 self.assertIsNotNone(m)
2054 self.assertEqual(m.start(), size)
2055 self.assertEqual(m.end(), size)
2056
2057 # The huge memuse is because of re.sub() using a list and a join()
2058 # to create the replacement result.

Callers

nothing calls this directly

Calls 5

assertIsNotNoneMethod · 0.80
searchMethod · 0.45
assertEqualMethod · 0.45
startMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected