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

This commit is contained in:
Vinay Sajip 2009-04-05 11:06:24 +00:00
parent 50ba6e1b50
commit 1e566cec6f
1 changed files with 1 additions and 1 deletions

View File

@ -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()