instead of using the mapping() function.
COUNT = 10
def test_weak_values(self):
- dict = weakref.mapping()
+ dict = weakref.WeakValueDictionary()
objects = map(Object, range(self.COUNT))
for o in objects:
dict[o.arg] = o
"deleting the values did not clear the dictionary")
def test_weak_keys(self):
- dict = weakref.mapping(weakkeys=1)
+ dict = weakref.WeakKeyDictionary()
objects = map(Object, range(self.COUNT))
for o in objects:
dict[o] = o.arg