@@ -1543,8 +1543,8 @@ def callback(ignored):
15431543 assert not detector .gc_happened
15441544 while not detector .gc_happened :
15451545 i += 1
1546- if i > 100000 :
1547- self .fail ("gc didn't happen after 100000 iterations" )
1546+ if i > 10000 :
1547+ self .fail ("gc didn't happen after 10000 iterations" )
15481548 self .assertEqual (len (ouch ), 0 )
15491549 junk .append ([]) # this will eventually trigger gc
15501550
@@ -1616,8 +1616,8 @@ def __del__(self):
16161616 gc .collect ()
16171617 while not detector .gc_happened :
16181618 i += 1
1619- if i > 50000 :
1620- self .fail ("gc didn't happen after 50000 iterations" )
1619+ if i > 10000 :
1620+ self .fail ("gc didn't happen after 10000 iterations" )
16211621 self .assertEqual (len (ouch ), 0 )
16221622 junk .append ([]) # this will eventually trigger gc
16231623
@@ -1634,8 +1634,8 @@ def test_indirect_calls_with_gc_disabled(self):
16341634 detector = GC_Detector ()
16351635 while not detector .gc_happened :
16361636 i += 1
1637- if i > 100000 :
1638- self .fail ("gc didn't happen after 100000 iterations" )
1637+ if i > 10000 :
1638+ self .fail ("gc didn't happen after 10000 iterations" )
16391639 junk .append ([]) # this will eventually trigger gc
16401640
16411641 try :
@@ -1645,11 +1645,11 @@ def test_indirect_calls_with_gc_disabled(self):
16451645 detector = GC_Detector ()
16461646 while not detector .gc_happened :
16471647 i += 1
1648- if i > 100000 :
1648+ if i > 10000 :
16491649 break
16501650 junk .append ([]) # this may eventually trigger gc (if it is enabled)
16511651
1652- self .assertEqual (i , 100001 )
1652+ self .assertEqual (i , 10001 )
16531653 finally :
16541654 gc .enable ()
16551655
0 commit comments