summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-04-10 19:09:35 (GMT)
committerFred Drake <fdrake@acm.org>2001-04-10 19:09:35 (GMT)
commitbf43691ccb5198ab0f853ed2297afa98f9ad878c (patch)
treed3d78e5daa223a65484883f76fb872b61610284c
parentf6cdead8e9ef112fc1ccb43317508e033c0cbb7b (diff)
downloadcpython-bf43691ccb5198ab0f853ed2297afa98f9ad878c.zip
cpython-bf43691ccb5198ab0f853ed2297afa98f9ad878c.tar.gz
cpython-bf43691ccb5198ab0f853ed2297afa98f9ad878c.tar.bz2
Use the WeakKeyDictionary and WeakValueDictionary classes directly
instead of using the mapping() function.
-rw-r--r--Lib/test/test_weakref.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_weakref.py b/Lib/test/test_weakref.py
index 1e193f1..d818b33 100644
--- a/Lib/test/test_weakref.py
+++ b/Lib/test/test_weakref.py
@@ -210,7 +210,7 @@ class MappingTestCase(TestBase):
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
@@ -236,7 +236,7 @@ class MappingTestCase(TestBase):
"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