diff options
author | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-07 12:18:33 (GMT) |
---|---|---|
committer | Florent Xicluna <florent.xicluna@gmail.com> | 2010-03-07 12:18:33 (GMT) |
commit | 6de9e938a5f70128a77c589b3ec40936f6335c1c (patch) | |
tree | c92fde2ad98ab954b494c59b1554da17f3720ccd /Lib/test/test_random.py | |
parent | 1f3b4e12e8ba9cd896625ba02ea1ab6849ca3a07 (diff) | |
download | cpython-6de9e938a5f70128a77c589b3ec40936f6335c1c.zip cpython-6de9e938a5f70128a77c589b3ec40936f6335c1c.tar.gz cpython-6de9e938a5f70128a77c589b3ec40936f6335c1c.tar.bz2 |
Issue #7849: Now the utility ``check_warnings`` verifies if the warnings are
effectively raised. A new utility ``check_py3k_warnings`` deals with py3k warnings.
Diffstat (limited to 'Lib/test/test_random.py')
-rw-r--r-- | Lib/test/test_random.py | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py index b4998b9..94c20ce 100644 --- a/Lib/test/test_random.py +++ b/Lib/test/test_random.py @@ -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 |