Issue #5695: Moved logging.captureWarnings() call inside with statement in WarningsTest.test_warnings.
This commit is contained in:
parent
50ba6e1b50
commit
1e566cec6f
|
@ -912,8 +912,8 @@ class EncodingTest(BaseTest):
|
||||||
class WarningsTest(BaseTest):
|
class WarningsTest(BaseTest):
|
||||||
|
|
||||||
def test_warnings(self):
|
def test_warnings(self):
|
||||||
logging.captureWarnings(True)
|
|
||||||
with warnings.catch_warnings():
|
with warnings.catch_warnings():
|
||||||
|
logging.captureWarnings(True)
|
||||||
warnings.filterwarnings("always", category=UserWarning)
|
warnings.filterwarnings("always", category=UserWarning)
|
||||||
try:
|
try:
|
||||||
file = cStringIO.StringIO()
|
file = cStringIO.StringIO()
|
||||||
|
|
Loading…
Reference in New Issue