Fixing - Issue7026 - RuntimeError: dictionary changed size during iteration. Patch by flox

This commit is contained in:
Senthil Kumaran 2010-01-08 18:41:40 +00:00
parent 3194d1454c
commit 3ddc435af6
107 changed files with 794 additions and 436 deletions

View file

@ -12,7 +12,9 @@ class CFunctionCalls(unittest.TestCase):
self.assertRaises(TypeError, {}.has_key)
def test_varargs1(self):
{}.has_key(0)
# Silence Py3k warning
with test_support.check_warnings():
{}.has_key(0)
def test_varargs2(self):
self.assertRaises(TypeError, {}.has_key, 0, 1)
@ -24,11 +26,15 @@ class CFunctionCalls(unittest.TestCase):
pass
def test_varargs1_ext(self):
{}.has_key(*(0,))
# Silence Py3k warning
with test_support.check_warnings():
{}.has_key(*(0,))
def test_varargs2_ext(self):
try:
{}.has_key(*(1, 2))
# Silence Py3k warning
with test_support.check_warnings():
{}.has_key(*(1, 2))
except TypeError:
pass
else: