<s> import sys <EOL> import time <EOL> if '<STR_LIT>' not in sys . builtin_module_names : <EOL> from boltons . gcutils import get_all , toggle_gc_postcollect <EOL> def test_get_all ( ) : <EOL> class TestType ( object ) : <EOL> pass <EOL> tt = TestType ( ) <EOL> assert len ( get_all ( TestType ) ) == <NUM_LIT:1> <EOL> assert len ( get_all ( bool ) ) == <NUM_LIT:0> <EOL> return <EOL> def test_toggle_gc_postcollect ( ) : <EOL> COUNT = int ( <NUM_LIT> ) <EOL> start = time . time ( ) <EOL> with toggle_gc_postcollect : <EOL> x = [ { } for x in range ( COUNT ) ] <EOL> no_gc_time = time . time ( ) - start <EOL> start = time . time ( ) <EOL> x = [ { } for x in range ( COUNT ) ] <EOL> with_gc_time = time . time ( ) - start <EOL> time_diff = no_gc_time < with_gc_time </s>
