Commit 8c6a9696 authored by Rudi Chen's avatar Rudi Chen

Reduce the iteration count in some tests.

They tends to time out or just make the test suite run for longer. They definitely times out
when running a prototype moving gc.
parent 74fce7a4
......@@ -6,7 +6,7 @@ class C(object):
def f(self, i):
return i * i
def __getitem__(self, i):
if i < 1000:
if i < 200:
return self.f(i)
raise IndexError(i)
......@@ -25,7 +25,7 @@ class C2(object):
self.n += 1
return self.n * 2
def next(self):
if self.n < 1000:
if self.n < 200:
return self.f()
raise StopIteration()
......
......@@ -17,7 +17,7 @@ def call_function_far_up_the_stack(fn, num_calls_left=200):
# It's useful to call the GC at different locations in the stack in case that it's the
# call to the GC itself that left a lingering pointer (e.g. the pointer could be the
# __del__ attribute of an object we'd like to collect).
def call_gc_throughout_the_stack(number_of_gc_calls, num_calls_left=100):
def call_gc_throughout_the_stack(number_of_gc_calls, num_calls_left=30):
if num_calls_left > 0:
call_gc_throughout_the_stack(number_of_gc_calls, num_calls_left - 1)
if number_of_gc_calls >= num_calls_left:
......
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