Commit 1e566cec authored by Vinay Sajip's avatar Vinay Sajip

Issue #5695: Moved logging.captureWarnings() call inside with statement in...

Issue #5695: Moved logging.captureWarnings() call inside with statement in WarningsTest.test_warnings.
parent 50ba6e1b
......@@ -912,8 +912,8 @@ class EncodingTest(BaseTest):
class WarningsTest(BaseTest):
def test_warnings(self):
logging.captureWarnings(True)
with warnings.catch_warnings():
logging.captureWarnings(True)
warnings.filterwarnings("always", category=UserWarning)
try:
file = cStringIO.StringIO()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment