diff options
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") |