mirror of
https://github.com/freqtrade/freqtrade.git
synced 2024-11-10 10:21:59 +00:00
Print plot filename so it can be easily opened
This commit is contained in:
parent
62262d0bb5
commit
e4380b533b
|
@ -318,6 +318,7 @@ def store_plot_file(fig, filename: str, auto_open: bool = False) -> None:
|
||||||
"""
|
"""
|
||||||
|
|
||||||
Path("user_data/plots").mkdir(parents=True, exist_ok=True)
|
Path("user_data/plots").mkdir(parents=True, exist_ok=True)
|
||||||
|
_filename = Path('user_data/plots').joinpath(filename)
|
||||||
plot(fig, filename=str(Path('user_data/plots').joinpath(filename)),
|
plot(fig, filename=str(_filename),
|
||||||
auto_open=auto_open)
|
auto_open=auto_open)
|
||||||
|
logger.info(f"Stored plot as {_filename}")
|
||||||
|
|
|
@ -215,6 +215,8 @@ def test_generate_plot_file(mocker, caplog):
|
||||||
assert plot_mock.call_args[0][0] == fig
|
assert plot_mock.call_args[0][0] == fig
|
||||||
assert (plot_mock.call_args_list[0][1]['filename']
|
assert (plot_mock.call_args_list[0][1]['filename']
|
||||||
== "user_data/plots/freqtrade-plot-UNITTEST_BTC-5m.html")
|
== "user_data/plots/freqtrade-plot-UNITTEST_BTC-5m.html")
|
||||||
|
assert log_has("Stored plot as user_data/plots/freqtrade-plot-UNITTEST_BTC-5m.html",
|
||||||
|
caplog.record_tuples)
|
||||||
|
|
||||||
|
|
||||||
def test_add_profit():
|
def test_add_profit():
|
||||||
|
|
Loading…
Reference in New Issue
Block a user