diff options
author | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2009-07-19 03:39:54 (GMT) |
---|---|---|
committer | Hirokazu Yamamoto <ocean-city@m2.ccsnet.ne.jp> | 2009-07-19 03:39:54 (GMT) |
commit | 8bb2d5d1c4342ea6d22c18a80e6f5ff225c90002 (patch) | |
tree | 26a10c3e659b8b5976646f4242d4728ac4d00156 /Lib/test | |
parent | e38b0a8ec071723f038e29c922e47e94c231eb13 (diff) | |
download | cpython-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.py | 3 |
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): |