From: Antoine Pitrou Date: Mon, 3 Dec 2012 19:55:56 +0000 (+0100) Subject: Split the bigmem re test in two separate tests with different memory requirements. X-Git-Tag: v3.3.1rc1~565 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b33941ab02e47bffffdcb32b2ec4cc44654540bd;p=thirdparty%2FPython%2Fcpython.git Split the bigmem re test in two separate tests with different memory requirements. --- b33941ab02e47bffffdcb32b2ec4cc44654540bd diff --cc Lib/test/test_re.py index 82179b78c9e4,96a6bcedc8ec..28944b1c7809 --- a/Lib/test/test_re.py +++ b/Lib/test/test_re.py @@@ -949,10 -857,17 +949,17 @@@ class ReTests(unittest.TestCase) # Test behaviour when not given a string or pattern as parameter self.assertRaises(TypeError, re.compile, 0) - @bigmemtest(size=_2G, memuse=character_size) ++ @bigmemtest(size=_2G, memuse=1) + def test_large_search(self, size): + # Issue #10182: indices were 32-bit-truncated. + s = 'a' * size + m = re.search('$', s) + self.assertIsNotNone(m) + # The huge memuse is because of re.sub() using a list and a join() # to create the replacement result. - @bigmemtest(size=_2G, memuse=20) - def test_large(self, size): - @bigmemtest(size=_2G, memuse=16 + 2 * character_size) ++ @bigmemtest(size=_2G, memuse=16 + 2) + def test_large_subn(self, size): # Issue #10182: indices were 32-bit-truncated. s = 'a' * size m = re.search('$', s)