Kaydet (Commit) a5d9917d authored tarafından Antoine Pitrou's avatar Antoine Pitrou

Fix test_splitlines to reach its size estimate

üst f81ad6fa
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment