diff options
author | Raymond Hettinger <python@rcn.com> | 2004-09-30 15:07:29 +0000 |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2004-09-30 15:07:29 +0000 |
commit | 162af3519df461e128953a0c9a13f2078743c52a (patch) | |
tree | 71aee3e4c362a650d576a8dce7943137cf8f8478 /Lib/test/test_dict.py | |
parent | 588b883e9c9c004a76fb50200c9e9df05065828c (diff) | |
download | cpython-162af3519df461e128953a0c9a13f2078743c52a.tar.gz |
Expand scope to include general mapping protocol tests.
Many of these tests are redundant, but this will ensure
that the mapping protocols all stay in sync.
Also, added a test for dictionary subclasses.
Diffstat (limited to 'Lib/test/test_dict.py')
-rw-r--r-- | Lib/test/test_dict.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/test/test_dict.py b/Lib/test/test_dict.py index e05e734ac6..e13829caec 100644 --- a/Lib/test/test_dict.py +++ b/Lib/test/test_dict.py @@ -395,9 +395,22 @@ class DictTest(unittest.TestCase): else: self.fail("< didn't raise Exc") +import mapping_tests + +class GeneralMappingTests(mapping_tests.BasicTestMappingProtocol): + type2test = dict + +class Dict(dict): + pass + +class SubclassMappingTests(mapping_tests.BasicTestMappingProtocol): + type2test = Dict + def test_main(): test_support.run_unittest( DictTest, + GeneralMappingTests, + SubclassMappingTests, ) if __name__ == "__main__": |