Replace catch_warnings with check_warnings when it makes sense. Use assertRaises context manager to simplify some tests.
diff --git a/Lib/test/test_sundry.py b/Lib/test/test_sundry.py
index cef155b..3aade6d 100644
--- a/Lib/test/test_sundry.py
+++ b/Lib/test/test_sundry.py
@@ -3,13 +3,11 @@
from test import test_support
import sys
import unittest
-import warnings
class TestUntestedModules(unittest.TestCase):
def test_at_least_import_untested_modules(self):
- with warnings.catch_warnings():
- warnings.simplefilter("ignore")
+ with test_support.check_warnings(quiet=True):
import CGIHTTPServer
import audiodev
import bdb