mirror of
https://github.com/python/cpython.git
synced 2025-09-27 10:50:04 +00:00
Silence a couple of warnings.
This commit is contained in:
parent
b22c3fe5d8
commit
030aa35a1b
2 changed files with 5 additions and 2 deletions
|
@ -132,6 +132,8 @@ class pickling_metaclass(type):
|
||||||
def __reduce__(self):
|
def __reduce__(self):
|
||||||
return (create_dynamic_class, self.reduce_args)
|
return (create_dynamic_class, self.reduce_args)
|
||||||
|
|
||||||
|
__hash__ = None
|
||||||
|
|
||||||
def create_dynamic_class(name, bases):
|
def create_dynamic_class(name, bases):
|
||||||
result = pickling_metaclass(name, bases, dict())
|
result = pickling_metaclass(name, bases, dict())
|
||||||
result.reduce_args = (name, bases)
|
result.reduce_args = (name, bases)
|
||||||
|
|
|
@ -548,8 +548,9 @@ class TestChainMap(unittest.TestCase):
|
||||||
[dcomb.get(k, 10) for k in klist]) # get()
|
[dcomb.get(k, 10) for k in klist]) # get()
|
||||||
self.assertEqual([k in cm for k in klist],
|
self.assertEqual([k in cm for k in klist],
|
||||||
[k in dcomb for k in klist]) # __contains__()
|
[k in dcomb for k in klist]) # __contains__()
|
||||||
self.assertEqual([cm.has_key(k) for k in klist],
|
with test_support.check_py3k_warnings():
|
||||||
[dcomb.has_key(k) for k in klist]) # has_key()
|
self.assertEqual([cm.has_key(k) for k in klist],
|
||||||
|
[dcomb.has_key(k) for k in klist]) # has_key()
|
||||||
|
|
||||||
class Issue7005TestCase(unittest.TestCase):
|
class Issue7005TestCase(unittest.TestCase):
|
||||||
"""Test output when None is set() as a value and allow_no_value == False.
|
"""Test output when None is set() as a value and allow_no_value == False.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue