@@ -27,9 +27,7 @@ def counter(_=None):
2727
2828
2929def test_sleek_ref ():
30-
31-
32-
30+
3331 volatile_things = [A (), 1 , 4.5 , 'meow' , u'woof' , [1 , 2 ], (1 , 2 ), {1 : 2 },
3432 set ([1 , 2 , 3 ])]
3533 unvolatile_things = [A .s , __builtins__ , list , type , list .append , str .join ,
@@ -63,7 +61,8 @@ def test_sleek_ref():
6361 assert counter () == count + 1
6462 assert sleek_ref () is not None
6563
66- def test_cute_sleek_value_dictionary_one_by_one ():
64+
65+ def test_cute_sleek_value_dictionary ():
6766 volatile_things = [A (), 1 , 4.5 , 'meow' , u'woof' , [1 , 2 ], (1 , 2 ), {1 : 2 },
6867 set ([1 , 2 , 3 ])]
6968 unvolatile_things = [A .s , __builtins__ , list , type , list .append , str .join ,
@@ -72,9 +71,10 @@ def test_cute_sleek_value_dictionary_one_by_one():
7271 # Using len(csvd) as our key; Just to guarantee we're not running over an
7372 # existing key.
7473
74+ csvd = CuteSleekValueDictionary (counter )
75+
7576 while volatile_things :
7677 volatile_thing = volatile_things .pop ()
77- csvd = CuteSleekValueDictionary (counter )
7878 if _is_weakreffable (volatile_thing ):
7979 csvd [len (csvd )] = volatile_thing
8080 count = counter ()
@@ -87,6 +87,7 @@ def test_cute_sleek_value_dictionary_one_by_one():
8787 del volatile_thing
8888 gc .collect ()
8989 assert counter () == count + 1
90+
9091
9192 while unvolatile_things :
9293 unvolatile_thing = unvolatile_things .pop ()
@@ -98,7 +99,8 @@ def test_cute_sleek_value_dictionary_one_by_one():
9899 gc .collect ()
99100 assert counter () == count + 1
100101
101- def test_cute_sleek_value_dictionary ():
102+
103+ def test_cute_sleek_value_dictionary_one_by_one ():
102104 volatile_things = [A (), 1 , 4.5 , 'meow' , u'woof' , [1 , 2 ], (1 , 2 ), {1 : 2 },
103105 set ([1 , 2 , 3 ])]
104106 unvolatile_things = [A .s , __builtins__ , list , type , list .append , str .join ,
0 commit comments