mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
#7092 - Silence more py3k deprecation warnings, using test_support.check_py3k_warnings() helper.
This commit is contained in:
parent
8cb253f8d6
commit
0762788081
38 changed files with 287 additions and 181 deletions
|
|
@ -12,7 +12,8 @@ class CFunctionCalls(unittest.TestCase):
|
|||
self.assertRaises(TypeError, {}.has_key)
|
||||
|
||||
def test_varargs1(self):
|
||||
{}.has_key(0)
|
||||
with test_support.check_py3k_warnings():
|
||||
{}.has_key(0)
|
||||
|
||||
def test_varargs2(self):
|
||||
self.assertRaises(TypeError, {}.has_key, 0, 1)
|
||||
|
|
@ -24,11 +25,13 @@ class CFunctionCalls(unittest.TestCase):
|
|||
pass
|
||||
|
||||
def test_varargs1_ext(self):
|
||||
{}.has_key(*(0,))
|
||||
with test_support.check_py3k_warnings():
|
||||
{}.has_key(*(0,))
|
||||
|
||||
def test_varargs2_ext(self):
|
||||
try:
|
||||
{}.has_key(*(1, 2))
|
||||
with test_support.check_py3k_warnings():
|
||||
{}.has_key(*(1, 2))
|
||||
except TypeError:
|
||||
pass
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue