mirror of
https://github.com/python/cpython.git
synced 2025-07-28 21:55:21 +00:00
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:
parent
1f3b4e12e8
commit
6de9e938a5
8 changed files with 102 additions and 27 deletions
|
@ -390,7 +390,7 @@ class OtherFileTests(unittest.TestCase):
|
|||
self.assertRaises(TypeError, _FileIO, "1", 0, 0)
|
||||
|
||||
def testWarnings(self):
|
||||
with check_warnings() as w:
|
||||
with check_warnings(quiet=True) as w:
|
||||
self.assertEqual(w.warnings, [])
|
||||
self.assertRaises(TypeError, _FileIO, [])
|
||||
self.assertEqual(w.warnings, [])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue