tests: Reduce large object allocations so tests can run with small heap.
This commit is contained in:
parent
52d7685d9a
commit
14848ffa12
|
@ -12,7 +12,7 @@ print(d)
|
|||
print(d[1])
|
||||
|
||||
x = 1
|
||||
while x < 1000:
|
||||
while x < 100:
|
||||
d[x] = x
|
||||
x += 1
|
||||
print(d[500])
|
||||
print(d[50])
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
a = {i: 2*i for i in range(1000)}
|
||||
a = {i: 2*i for i in range(100)}
|
||||
b = a.copy()
|
||||
for i in range(1000):
|
||||
for i in range(100):
|
||||
print(i, b[i])
|
||||
print(len(b))
|
||||
|
|
|
@ -2,7 +2,7 @@ print(list(enumerate([])))
|
|||
print(list(enumerate([1, 2, 3])))
|
||||
print(list(enumerate([1, 2, 3], 5)))
|
||||
print(list(enumerate([1, 2, 3], -5)))
|
||||
print(list(enumerate(range(1000))))
|
||||
print(list(enumerate(range(100))))
|
||||
|
||||
# specifying args with keywords
|
||||
print(list(enumerate([1, 2, 3], start=1)))
|
||||
|
|
|
@ -27,7 +27,7 @@ print(l)
|
|||
print(l == sorted(l, reverse=False))
|
||||
|
||||
# test large lists (should not stack overflow)
|
||||
l = list(range(2000))
|
||||
l = list(range(200))
|
||||
l.sort()
|
||||
print(l[0], l[-1])
|
||||
l.sort(reverse=True)
|
||||
|
|
Loading…
Reference in New Issue