Commit 14bf0a0a authored by Vinay Sajip's avatar Vinay Sajip

Issue #5695: Minor tweak to improve the code as suggested by Brett Cannon and...

Issue #5695: Minor tweak to improve the code as suggested by Brett Cannon and as implemented in the Py3K branch.
parent dda7b199
......@@ -914,8 +914,8 @@ class WarningsTest(BaseTest):
def test_warnings(self):
with warnings.catch_warnings():
logging.captureWarnings(True)
warnings.filterwarnings("always", category=UserWarning)
try:
warnings.filterwarnings("always", category=UserWarning)
file = cStringIO.StringIO()
h = logging.StreamHandler(file)
logger = logging.getLogger("py.warnings")
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment