diff options
author | Senthil Kumaran <orsenthil@gmail.com> | 2010-01-08 18:41:40 (GMT) |
---|---|---|
committer | Senthil Kumaran <orsenthil@gmail.com> | 2010-01-08 18:41:40 (GMT) |
commit | 3ddc435af6873c6304058d7bcbcb19ee4fba7781 (patch) | |
tree | c7a03cf0a8b856bae2ebebba55b09f775845c7ca /Lib/test/test_sys.py | |
parent | 3194d1454cbc11ec477d83fff3fc749972107d29 (diff) | |
download | cpython-3ddc435af6873c6304058d7bcbcb19ee4fba7781.zip cpython-3ddc435af6873c6304058d7bcbcb19ee4fba7781.tar.gz cpython-3ddc435af6873c6304058d7bcbcb19ee4fba7781.tar.bz2 |
Fixing - Issue7026 - RuntimeError: dictionary changed size during iteration. Patch by flox
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r-- | Lib/test/test_sys.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 6768775..04e6607 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -68,7 +68,9 @@ class SysModuleTest(unittest.TestCase): # Python/pythonrun.c::PyErr_PrintEx() is tricky. def test_exc_clear(self): - self.assertRaises(TypeError, sys.exc_clear, 42) + # Silence Py3k warning + with test.test_support.check_warnings(): + self.assertRaises(TypeError, sys.exc_clear, 42) # Verify that exc_info is present and matches exc, then clear it, and # check that it worked. @@ -78,7 +80,9 @@ class SysModuleTest(unittest.TestCase): self.assertTrue(value is exc) self.assertTrue(traceback is not None) - sys.exc_clear() + # Silence Py3k warning + with test.test_support.check_warnings(): + sys.exc_clear() typ, value, traceback = sys.exc_info() self.assertTrue(typ is None) @@ -484,7 +488,9 @@ class SizeofTest(unittest.TestCase): # bool check(True, size(h + 'l')) # buffer - check(buffer(''), size(h + '2P2Pil')) + # Silence Py3k warning + with test.test_support.check_warnings(): + check(buffer(''), size(h + '2P2Pil')) # builtin_function_or_method check(len, size(h + '3P')) # bytearray |