summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_warnings.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/test/test_warnings.py b/Lib/test/test_warnings.py
index 1f5d05f..71944cd 100644
--- a/Lib/test/test_warnings.py
+++ b/Lib/test/test_warnings.py
@@ -347,8 +347,7 @@ class WarnTests(unittest.TestCase):
return ("A bad formatted string %(err)" %
{"err" : "there is no %(err)s"})
- with self.assertRaises(ValueError):
- self.module.warn(BadStrWarning())
+ self.assertRaises(ValueError, self.module.warn, BadStrWarning())
class CWarnTests(BaseTest, WarnTests):