]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix test_splitlines to reach its size estimate
authorAntoine Pitrou <solipsis@pitrou.net>
Thu, 6 Oct 2011 20:19:07 +0000 (22:19 +0200)
committerAntoine Pitrou <solipsis@pitrou.net>
Thu, 6 Oct 2011 20:19:07 +0000 (22:19 +0200)
Lib/test/test_bigmem.py

index 2f50344f831270232f440a90bae49f0e15bc20eb..32523e444a970e0772480fe2c0588347aaaae22c 100644 (file)
@@ -393,9 +393,9 @@ class BaseStrTest:
         # take up an inordinate amount of memory
         chunksize = int(size ** 0.5 + 2) // 2
         SUBSTR = _(' ') * chunksize + _('\n') + _(' ') * chunksize + _('\r\n')
-        s = SUBSTR * chunksize
+        s = SUBSTR * (chunksize * 2)
         l = s.splitlines()
-        self.assertEqual(len(l), chunksize * 2)
+        self.assertEqual(len(l), chunksize * 4)
         expected = _(' ') * chunksize
         for item in l:
             self.assertEqual(item, expected)