Add test for list-freqaimodels
This commit is contained in:
parent
4bfe58706b
commit
93ad3810fd
@ -18,6 +18,7 @@ from freqtrade.commands import (start_backtesting_show, start_convert_data, star
|
|||||||
from freqtrade.commands.db_commands import start_convert_db
|
from freqtrade.commands.db_commands import start_convert_db
|
||||||
from freqtrade.commands.deploy_commands import (clean_ui_subdir, download_and_install_ui,
|
from freqtrade.commands.deploy_commands import (clean_ui_subdir, download_and_install_ui,
|
||||||
get_ui_download_url, read_ui_version)
|
get_ui_download_url, read_ui_version)
|
||||||
|
from freqtrade.commands.list_commands import start_list_freqAI_models
|
||||||
from freqtrade.configuration import setup_utils_configuration
|
from freqtrade.configuration import setup_utils_configuration
|
||||||
from freqtrade.enums import RunMode
|
from freqtrade.enums import RunMode
|
||||||
from freqtrade.exceptions import OperationalException
|
from freqtrade.exceptions import OperationalException
|
||||||
@ -944,6 +945,34 @@ def test_start_list_strategies(capsys):
|
|||||||
assert str(Path("broken_strats/broken_futures_strategies.py")) in captured.out
|
assert str(Path("broken_strats/broken_futures_strategies.py")) in captured.out
|
||||||
|
|
||||||
|
|
||||||
|
def test_start_list_freqAI_models(capsys):
|
||||||
|
|
||||||
|
args = [
|
||||||
|
"list-freqaimodels",
|
||||||
|
"-1"
|
||||||
|
]
|
||||||
|
pargs = get_args(args)
|
||||||
|
pargs['config'] = None
|
||||||
|
start_list_freqAI_models(pargs)
|
||||||
|
captured = capsys.readouterr()
|
||||||
|
assert "LightGBMClassifier" in captured.out
|
||||||
|
assert "LightGBMRegressor" in captured.out
|
||||||
|
assert "XGBoostRegressor" in captured.out
|
||||||
|
assert "<builtin>/LightGBMRegressor.py" not in captured.out
|
||||||
|
|
||||||
|
args = [
|
||||||
|
"list-freqaimodels",
|
||||||
|
]
|
||||||
|
pargs = get_args(args)
|
||||||
|
pargs['config'] = None
|
||||||
|
start_list_freqAI_models(pargs)
|
||||||
|
captured = capsys.readouterr()
|
||||||
|
assert "LightGBMClassifier" in captured.out
|
||||||
|
assert "LightGBMRegressor" in captured.out
|
||||||
|
assert "XGBoostRegressor" in captured.out
|
||||||
|
assert "<builtin>/LightGBMRegressor.py" in captured.out
|
||||||
|
|
||||||
|
|
||||||
def test_start_test_pairlist(mocker, caplog, tickers, default_conf, capsys):
|
def test_start_test_pairlist(mocker, caplog, tickers, default_conf, capsys):
|
||||||
patch_exchange(mocker, mock_markets=True)
|
patch_exchange(mocker, mock_markets=True)
|
||||||
mocker.patch.multiple('freqtrade.exchange.Exchange',
|
mocker.patch.multiple('freqtrade.exchange.Exchange',
|
||||||
|
Loading…
Reference in New Issue
Block a user