diff options
author | Brett Cannon <bcannon@gmail.com> | 2009-04-05 18:57:32 (GMT) |
---|---|---|
committer | Brett Cannon <bcannon@gmail.com> | 2009-04-05 18:57:32 (GMT) |
commit | 5b9082a9591380cbfd961ef5273df36da5b1302a (patch) | |
tree | 9b4c6d460a485c52aaf1eacd16e9ac43e8faf48e /Lib | |
parent | ea26163c6a7d6ec69e76a25d6349afd40409a986 (diff) | |
download | cpython-5b9082a9591380cbfd961ef5273df36da5b1302a.zip cpython-5b9082a9591380cbfd961ef5273df36da5b1302a.tar.gz cpython-5b9082a9591380cbfd961ef5273df36da5b1302a.tar.bz2 |
Blocked revisions 71221 via svnmerge
........
r71221 | vinay.sajip | 2009-04-05 04:06:24 -0700 (Sun, 05 Apr 2009) | 1 line
Issue #5695: Moved logging.captureWarnings() call inside with statement in WarningsTest.test_warnings.
........
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_logging.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index a4da5da..1463cf7 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -912,10 +912,10 @@ class EncodingTest(BaseTest): class WarningsTest(BaseTest): def test_warnings(self): - logging.captureWarnings(True) with warnings.catch_warnings(): - warnings.filterwarnings("always", category=UserWarning) + logging.captureWarnings(True) try: + warnings.filterwarnings("always", category=UserWarning) file = io.StringIO() h = logging.StreamHandler(file) logger = logging.getLogger("py.warnings") |