mirror of
https://github.com/freqtrade/freqtrade.git
synced 2026-05-03 07:27:54 +00:00
test: Add fixture to prevent having disabled loggers
This commit is contained in:
@@ -549,6 +549,14 @@ def user_dir(mocker, tmp_path) -> Path:
|
||||
return user_dir
|
||||
|
||||
|
||||
@pytest.fixture()
|
||||
def keep_log_config_loggers(mocker):
|
||||
# Mock the _handle_existing_loggers function to prevent it from disabling all loggers.
|
||||
# This is necessary to keep all loggers active, and avoid random failures if
|
||||
# this file is ran before the test_rest_client file.
|
||||
mocker.patch("logging.config._handle_existing_loggers")
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def patch_coingecko(mocker) -> None:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user