mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-01 17:43:06 +00:00
Avoid having test-result influence from user_data/
this avoids potential deprecation warnings (or even errors) caused by strategies in user_data/strategies
This commit is contained in:
@@ -172,8 +172,8 @@ def test__pprint_dict():
|
||||
}"""
|
||||
|
||||
|
||||
def test_get_strategy_filename(default_conf):
|
||||
|
||||
def test_get_strategy_filename(default_conf, tmp_path):
|
||||
default_conf['user_data_dir'] = tmp_path
|
||||
x = HyperoptTools.get_strategy_filename(default_conf, 'StrategyTestV3')
|
||||
assert isinstance(x, Path)
|
||||
assert x == Path(__file__).parents[1] / 'strategy/strats/strategy_test_v3.py'
|
||||
@@ -233,6 +233,7 @@ def test_export_params(tmp_path):
|
||||
|
||||
def test_try_export_params(default_conf, tmp_path, caplog, mocker):
|
||||
default_conf['disableparamexport'] = False
|
||||
default_conf['user_data_dir'] = tmp_path
|
||||
export_mock = mocker.patch("freqtrade.optimize.hyperopt_tools.HyperoptTools.export_params")
|
||||
|
||||
filename = tmp_path / f"{CURRENT_TEST_STRATEGY}.json"
|
||||
|
||||
Reference in New Issue
Block a user