From be41981ef08f65d2d377d7a225456fbdc6221b83 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 24 Mar 2020 20:10:15 +0100 Subject: [PATCH] Test warnings with filter always on --- tests/test_configuration.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_configuration.py b/tests/test_configuration.py index 1e9d6440d..79387ba7a 100644 --- a/tests/test_configuration.py +++ b/tests/test_configuration.py @@ -73,6 +73,7 @@ def test__args_to_config(caplog): configuration = Configuration(args) config = {} with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always") # No warnings ... configuration._args_to_config(config, argname="strategy_path", logstring="DeadBeef") assert len(w) == 0 @@ -82,6 +83,7 @@ def test__args_to_config(caplog): configuration = Configuration(args) config = {} with warnings.catch_warnings(record=True) as w: + warnings.simplefilter("always") # Deprecation warnings! configuration._args_to_config(config, argname="strategy_path", logstring="DeadBeef", deprecated_msg="Going away soon!")