mirror of https://github.com/python/cpython
Fix other test requirements.
This commit is contained in:
parent
0673088ded
commit
8e6287f50d
|
@ -485,7 +485,7 @@ class StrTest(unittest.TestCase):
|
||||||
self.assertEqual(s.count('.'), 3)
|
self.assertEqual(s.count('.'), 3)
|
||||||
self.assertEqual(s.count('-'), size * 2)
|
self.assertEqual(s.count('-'), size * 2)
|
||||||
|
|
||||||
@bigmemtest(minsize=_2G + 10, memuse=2)
|
@bigmemtest(minsize=_2G + 10, memuse=5)
|
||||||
def test_repr_small(self, size):
|
def test_repr_small(self, size):
|
||||||
s = '-' * size
|
s = '-' * size
|
||||||
s = repr(s)
|
s = repr(s)
|
||||||
|
@ -497,7 +497,6 @@ class StrTest(unittest.TestCase):
|
||||||
# repr() will create a string four times as large as this 'binary
|
# repr() will create a string four times as large as this 'binary
|
||||||
# string', but we don't want to allocate much more than twice
|
# string', but we don't want to allocate much more than twice
|
||||||
# size in total. (We do extra testing in test_repr_large())
|
# size in total. (We do extra testing in test_repr_large())
|
||||||
size = size // 5 * 2
|
|
||||||
s = '\x00' * size
|
s = '\x00' * size
|
||||||
s = repr(s)
|
s = repr(s)
|
||||||
self.assertEqual(len(s), size * 4 + 2)
|
self.assertEqual(len(s), size * 4 + 2)
|
||||||
|
@ -541,7 +540,7 @@ class StrTest(unittest.TestCase):
|
||||||
self.assertEqual(len(s), size * 2)
|
self.assertEqual(len(s), size * 2)
|
||||||
self.assertEqual(s.count('.'), size * 2)
|
self.assertEqual(s.count('.'), size * 2)
|
||||||
|
|
||||||
@bigmemtest(minsize=_2G + 20, memuse=1)
|
@bigmemtest(minsize=_2G + 20, memuse=2)
|
||||||
def test_slice_and_getitem(self, size):
|
def test_slice_and_getitem(self, size):
|
||||||
SUBSTR = '0123456789'
|
SUBSTR = '0123456789'
|
||||||
sublen = len(SUBSTR)
|
sublen = len(SUBSTR)
|
||||||
|
|
Loading…
Reference in New Issue