From e4380b533bc4515cd6fc227690d7efb77b945d12 Mon Sep 17 00:00:00 2001 From: Matthias Date: Sun, 4 Aug 2019 10:25:46 +0200 Subject: [PATCH] Print plot filename so it can be easily opened --- freqtrade/plot/plotting.py | 5 +++-- freqtrade/tests/test_plotting.py | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/freqtrade/plot/plotting.py b/freqtrade/plot/plotting.py index 5c9c6e457..d03d3ae53 100644 --- a/freqtrade/plot/plotting.py +++ b/freqtrade/plot/plotting.py @@ -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) - - plot(fig, filename=str(Path('user_data/plots').joinpath(filename)), + _filename = Path('user_data/plots').joinpath(filename) + plot(fig, filename=str(_filename), auto_open=auto_open) + logger.info(f"Stored plot as {_filename}") diff --git a/freqtrade/tests/test_plotting.py b/freqtrade/tests/test_plotting.py index 509bf7880..f9da773fe 100644 --- a/freqtrade/tests/test_plotting.py +++ b/freqtrade/tests/test_plotting.py @@ -215,6 +215,8 @@ def test_generate_plot_file(mocker, caplog): assert plot_mock.call_args[0][0] == fig assert (plot_mock.call_args_list[0][1]['filename'] == "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():