[Python-checkins] CVS: python/dist/src/Lib/test test_weakref.py,1.4,1.5
Fred L. Drake
fdrake@users.sourceforge.net
2001年4月10日 12:09:37 -0700
Update of /cvsroot/python/python/dist/src/Lib/test
In directory usw-pr-cvs1:/tmp/cvs-serv8622
Modified Files:
test_weakref.py
Log Message:
Use the WeakKeyDictionary and WeakValueDictionary classes directly
instead of using the mapping() function.
Index: test_weakref.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_weakref.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** test_weakref.py 2001年03月23日 04:22:45 1.4
--- test_weakref.py 2001年04月10日 19:09:35 1.5
***************
*** 211,215 ****
def test_weak_values(self):
! dict = weakref.mapping()
objects = map(Object, range(self.COUNT))
for o in objects:
--- 211,215 ----
def test_weak_values(self):
! dict = weakref.WeakValueDictionary()
objects = map(Object, range(self.COUNT))
for o in objects:
***************
*** 237,241 ****
def test_weak_keys(self):
! dict = weakref.mapping(weakkeys=1)
objects = map(Object, range(self.COUNT))
for o in objects:
--- 237,241 ----
def test_weak_keys(self):
! dict = weakref.WeakKeyDictionary()
objects = map(Object, range(self.COUNT))
for o in objects: