@@ -1473,8 +1473,8 @@ def callback(ignored):
14731473 assert not detector .gc_happened
14741474 while not detector .gc_happened :
14751475 i += 1
1476- if i > 100000 :
1477- self .fail ("gc didn't happen after 100000 iterations" )
1476+ if i > 10000 :
1477+ self .fail ("gc didn't happen after 10000 iterations" )
14781478 self .assertEqual (len (ouch ), 0 )
14791479 junk .append ([]) # this will eventually trigger gc
14801480
@@ -1545,8 +1545,8 @@ def __del__(self):
15451545 gc .collect ()
15461546 while not detector .gc_happened :
15471547 i += 1
1548- if i > 50000 :
1549- self .fail ("gc didn't happen after 50000 iterations" )
1548+ if i > 10000 :
1549+ self .fail ("gc didn't happen after 10000 iterations" )
15501550 self .assertEqual (len (ouch ), 0 )
15511551 junk .append ([]) # this will eventually trigger gc
15521552
@@ -1563,8 +1563,8 @@ def test_indirect_calls_with_gc_disabled(self):
15631563 detector = GC_Detector ()
15641564 while not detector .gc_happened :
15651565 i += 1
1566- if i > 100000 :
1567- self .fail ("gc didn't happen after 100000 iterations" )
1566+ if i > 10000 :
1567+ self .fail ("gc didn't happen after 10000 iterations" )
15681568 junk .append ([]) # this will eventually trigger gc
15691569
15701570 try :
@@ -1574,11 +1574,11 @@ def test_indirect_calls_with_gc_disabled(self):
15741574 detector = GC_Detector ()
15751575 while not detector .gc_happened :
15761576 i += 1
1577- if i > 100000 :
1577+ if i > 10000 :
15781578 break
15791579 junk .append ([]) # this may eventually trigger gc (if it is enabled)
15801580
1581- self .assertEqual (i , 100001 )
1581+ self .assertEqual (i , 10001 )
15821582 finally :
15831583 gc .enable ()
15841584
0 commit comments