summaryrefslogtreecommitdiff
path: root/Lib/test/test_warnings.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_warnings.py')
-rw-r--r--Lib/test/test_warnings.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/test/test_warnings.py b/Lib/test/test_warnings.py
index a7ccb6b292..0ad83edb19 100644
--- a/Lib/test/test_warnings.py
+++ b/Lib/test/test_warnings.py
@@ -20,7 +20,7 @@ def showwarning(message, category, filename, lineno, file=None):
msg.filename = os.path.basename(filename)
msg.lineno = lineno
-class TestModule(unittest.TestCase):
+class CatchWarningTest(unittest.TestCase):
def setUp(self):
global msg
@@ -35,6 +35,8 @@ class TestModule(unittest.TestCase):
warnings.filters = self._filters[:]
warnings.showwarning = self._showwarning
+class TestModule(CatchWarningTest):
+
def test_warn_default_category(self):
for i in range(4):
text = 'multi %d' %i # Different text on each call