mirror of https://github.com/python/cpython
assertRaises can't be used as a context manager in 2.6.
This commit is contained in:
parent
e38b0a8ec0
commit
8bb2d5d1c4
|
@ -347,8 +347,7 @@ class WarnTests(unittest.TestCase):
|
||||||
return ("A bad formatted string %(err)" %
|
return ("A bad formatted string %(err)" %
|
||||||
{"err" : "there is no %(err)s"})
|
{"err" : "there is no %(err)s"})
|
||||||
|
|
||||||
with self.assertRaises(ValueError):
|
self.assertRaises(ValueError, self.module.warn, BadStrWarning())
|
||||||
self.module.warn(BadStrWarning())
|
|
||||||
|
|
||||||
|
|
||||||
class CWarnTests(BaseTest, WarnTests):
|
class CWarnTests(BaseTest, WarnTests):
|
||||||
|
|
Loading…
Reference in New Issue