mirror of
https://github.com/python/cpython.git
synced 2025-07-30 06:34:15 +00:00
Issue #5695: Moved logging.captureWarnings() call inside with statement in WarningsTest.test_warnings.
This commit is contained in:
parent
50ba6e1b50
commit
1e566cec6f
1 changed files with 1 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue