python/dist/src/Lib/test test_dict.py,1.1,1.2
Update of /cvsroot/python/python/dist/src/Lib/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16023 Modified Files: test_dict.py Log Message: 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. Index: test_dict.py =================================================================== RCS file: /cvsroot/python/python/dist/src/Lib/test/test_dict.py,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- test_dict.py 30 Sep 2004 13:46:00 -0000 1.1 +++ test_dict.py 30 Sep 2004 15:07:29 -0000 1.2 @@ -395,9 +395,22 @@ 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__":
participants (1)
-
rhettingerīŧ users.sourceforge.net