From: Ezio Melotti Date: Sun, 6 Nov 2011 16:50:32 +0000 (+0200) Subject: Silence a couple of warnings. X-Git-Tag: v2.7.3rc1~320 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=030aa35a1b5dc9a91b44abeda80d32df8a8d8952;p=python Silence a couple of warnings. --- diff --git a/Lib/test/pickletester.py b/Lib/test/pickletester.py index 2e3875c57b..c321f8e78a 100644 --- a/Lib/test/pickletester.py +++ b/Lib/test/pickletester.py @@ -132,6 +132,8 @@ class pickling_metaclass(type): def __reduce__(self): return (create_dynamic_class, self.reduce_args) + __hash__ = None + def create_dynamic_class(name, bases): result = pickling_metaclass(name, bases, dict()) result.reduce_args = (name, bases) diff --git a/Lib/test/test_cfgparser.py b/Lib/test/test_cfgparser.py index 4885c8c649..a7ad18dc0f 100644 --- a/Lib/test/test_cfgparser.py +++ b/Lib/test/test_cfgparser.py @@ -548,8 +548,9 @@ class TestChainMap(unittest.TestCase): [dcomb.get(k, 10) for k in klist]) # get() self.assertEqual([k in cm for k in klist], [k in dcomb for k in klist]) # __contains__() - self.assertEqual([cm.has_key(k) for k in klist], - [dcomb.has_key(k) for k in klist]) # has_key() + with test_support.check_py3k_warnings(): + self.assertEqual([cm.has_key(k) for k in klist], + [dcomb.has_key(k) for k in klist]) # has_key() class Issue7005TestCase(unittest.TestCase): """Test output when None is set() as a value and allow_no_value == False.