]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix size estimation for test_bigmem.StrTest.test_format
authorAntoine Pitrou <solipsis@pitrou.net>
Thu, 6 Oct 2011 19:55:51 +0000 (21:55 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Thu, 6 Oct 2011 19:55:51 +0000 (21:55 +0200)
Lib/test/test_bigmem.py

index e41c0105520f23088490dff43a3ad46c54126705..08a05530e448180526d0423d933c877836c23b85 100644 (file)
@@ -647,7 +647,9 @@ class StrTest(unittest.TestCase, BaseStrTest):
     def test_encode_ascii(self, size):
         return self.basic_encode_test(size, 'ascii', c='A')
 
-    @bigmemtest(size=_2G + 10, memuse=ascii_char_size * 2)
+    # str % (...) uses a Py_UCS4 intermediate representation
+
+    @bigmemtest(size=_2G + 10, memuse=ascii_char_size * 2 + ucs4_char_size)
     def test_format(self, size):
         s = '-' * size
         sf = '%s' % (s,)