#7092 - Silence more py3k deprecation warnings, using test_support.check_py3k_warnings() helper.

This commit is contained in:
Florent Xicluna 2010-03-21 01:14:24 +00:00
parent 8cb253f8d6
commit 0762788081
38 changed files with 287 additions and 181 deletions

View file

@ -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: