Merge pull request #3110 from freqtrade/fix_random_test
[minor] Test warnings with filter always on
This commit is contained in:
commit
4ea6f9d7eb
@ -97,6 +97,7 @@ def test__args_to_config(caplog):
|
|||||||
configuration = Configuration(args)
|
configuration = Configuration(args)
|
||||||
config = {}
|
config = {}
|
||||||
with warnings.catch_warnings(record=True) as w:
|
with warnings.catch_warnings(record=True) as w:
|
||||||
|
warnings.simplefilter("always")
|
||||||
# No warnings ...
|
# No warnings ...
|
||||||
configuration._args_to_config(config, argname="strategy_path", logstring="DeadBeef")
|
configuration._args_to_config(config, argname="strategy_path", logstring="DeadBeef")
|
||||||
assert len(w) == 0
|
assert len(w) == 0
|
||||||
@ -106,6 +107,7 @@ def test__args_to_config(caplog):
|
|||||||
configuration = Configuration(args)
|
configuration = Configuration(args)
|
||||||
config = {}
|
config = {}
|
||||||
with warnings.catch_warnings(record=True) as w:
|
with warnings.catch_warnings(record=True) as w:
|
||||||
|
warnings.simplefilter("always")
|
||||||
# Deprecation warnings!
|
# Deprecation warnings!
|
||||||
configuration._args_to_config(config, argname="strategy_path", logstring="DeadBeef",
|
configuration._args_to_config(config, argname="strategy_path", logstring="DeadBeef",
|
||||||
deprecated_msg="Going away soon!")
|
deprecated_msg="Going away soon!")
|
||||||
|
Loading…
Reference in New Issue
Block a user