summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinay Sajip <vinay_sajip@yahoo.co.uk>2009-04-05 11:06:24 (GMT)
committerVinay Sajip <vinay_sajip@yahoo.co.uk>2009-04-05 11:06:24 (GMT)
commit1e566cec6f8093018cf8fd1870124c0abd11a6cd (patch)
treea7a3516c9c8cd1504c967523c7e18a985bf6ee9b
parent50ba6e1b50af3603414cf9c760090e8eba0eb347 (diff)
downloadcpython-1e566cec6f8093018cf8fd1870124c0abd11a6cd.zip
cpython-1e566cec6f8093018cf8fd1870124c0abd11a6cd.tar.gz
cpython-1e566cec6f8093018cf8fd1870124c0abd11a6cd.tar.bz2
Issue #5695: Moved logging.captureWarnings() call inside with statement in WarningsTest.test_warnings.
-rw-r--r--Lib/test/test_logging.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 515fee9..72dded5 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -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()