Issue #7849: Now the utility `check_warnings` verifies if the warnings are

effectively raised.  A new utility ``check_py3k_warnings`` deals with py3k warnings.
This commit is contained in:
Florent Xicluna 2010-03-07 12:18:33 +00:00
parent 1f3b4e12e8
commit 6de9e938a5
8 changed files with 102 additions and 27 deletions

View file

@ -53,8 +53,7 @@ class TestBasicOps(unittest.TestCase):
state3 = self.gen.getstate() # s/b distinct from state2
self.assertNotEqual(state2, state3)
# Silence py3k warnings
with test_support.check_warnings():
with test_support.check_py3k_warnings(quiet=True):
self.assertRaises(TypeError, self.gen.jumpahead) # needs an arg
self.assertRaises(TypeError, self.gen.jumpahead, "ick") # wrong type
self.assertRaises(TypeError, self.gen.jumpahead, 2.3) # wrong type