summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2009-07-19 03:39:54 (GMT)
committerHirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp>2009-07-19 03:39:54 (GMT)
commit8bb2d5d1c4342ea6d22c18a80e6f5ff225c90002 (patch)
tree26a10c3e659b8b5976646f4242d4728ac4d00156 /Lib/test
parente38b0a8ec071723f038e29c922e47e94c231eb13 (diff)
downloadcpython-8bb2d5d1c4342ea6d22c18a80e6f5ff225c90002.zip
cpython-8bb2d5d1c4342ea6d22c18a80e6f5ff225c90002.tar.gz
cpython-8bb2d5d1c4342ea6d22c18a80e6f5ff225c90002.tar.bz2
assertRaises can't be used as a context manager in 2.6.
Diffstat (limited to 'Lib/test')
-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):