Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5b9082a

Browse files
committed
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. ........
1 parent ea26163 commit 5b9082a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Lib/test/test_logging.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -912,10 +912,10 @@ def test_encoding_cyrillic_unicode(self):
912912
class WarningsTest(BaseTest):
913913

914914
def test_warnings(self):
915-
logging.captureWarnings(True)
916915
with warnings.catch_warnings():
917-
warnings.filterwarnings("always", category=UserWarning)
916+
logging.captureWarnings(True)
918917
try:
918+
warnings.filterwarnings("always", category=UserWarning)
919919
file = io.StringIO()
920920
h = logging.StreamHandler(file)
921921
logger = logging.getLogger("py.warnings")

0 commit comments

Comments
 (0)