summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_weakref.py
diff options
context:
space:
mode:
authorWalter Dörwald <walter@livinglogic.de>2004-05-31 16:29:04 (GMT)
committerWalter Dörwald <walter@livinglogic.de>2004-05-31 16:29:04 (GMT)
commit0a6d0ff8d9ad27d66eb8195b9366e5b49dbb69b6 (patch)
treeac27098581c6e50a7776b6853950670aaa48473f /Lib/test/test_weakref.py
parentcbd0b365c1f27d390827e74a88a96f3a13034e0e (diff)
downloadcpython-0a6d0ff8d9ad27d66eb8195b9366e5b49dbb69b6.zip
cpython-0a6d0ff8d9ad27d66eb8195b9366e5b49dbb69b6.tar.gz
cpython-0a6d0ff8d9ad27d66eb8195b9366e5b49dbb69b6.tar.bz2
Port the dictionary tests from test_types.py to unittest. Collect as much
mapping tests as possible in mapping_test.py and reuse the tests in test_dict.py, test_userdict.py, test_weakref.py, test_os.py and test_shelve.py. From SF patch #736962.
Diffstat (limited to 'Lib/test/test_weakref.py')
-rw-r--r--Lib/test/test_weakref.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_weakref.py b/Lib/test/test_weakref.py
index 2924313..cf5d0a4 100644
--- a/Lib/test/test_weakref.py
+++ b/Lib/test/test_weakref.py
@@ -912,16 +912,16 @@ class MappingTestCase(TestBase):
self.assertEqual(len(d), 0)
self.assertEqual(count, 2)
-from test_userdict import TestMappingProtocol
+from test import mapping_tests
-class WeakValueDictionaryTestCase(TestMappingProtocol):
+class WeakValueDictionaryTestCase(mapping_tests.BasicTestMappingProtocol):
"""Check that WeakValueDictionary conforms to the mapping protocol"""
__ref = {"key1":Object(1), "key2":Object(2), "key3":Object(3)}
_tested_class = weakref.WeakValueDictionary
def _reference(self):
return self.__ref.copy()
-class WeakKeyDictionaryTestCase(TestMappingProtocol):
+class WeakKeyDictionaryTestCase(mapping_tests.BasicTestMappingProtocol):
"""Check that WeakKeyDictionary conforms to the mapping protocol"""
__ref = {Object("key1"):1, Object("key2"):2, Object("key3"):3}
_tested_class = weakref.WeakKeyDictionary