Update backtesting output terminology to "exit"

This commit is contained in:
Matthias
2022-03-22 06:43:37 +01:00
parent 35a4053dbe
commit 08777abd85
4 changed files with 19 additions and 19 deletions

View File

@@ -1304,7 +1304,7 @@ def test_backtest_start_multi_strat_nomock(default_conf, mocker, caplog, testdat
captured = capsys.readouterr()
assert 'BACKTESTING REPORT' in captured.out
assert 'SELL REASON STATS' in captured.out
assert 'EXIT REASON STATS' in captured.out
assert 'DAY BREAKDOWN' in captured.out
assert 'LEFT OPEN TRADES REPORT' in captured.out
assert '2017-11-14 21:17:00 -> 2017-11-14 22:58:00 | Max open trades : 1' in captured.out
@@ -1413,7 +1413,7 @@ def test_backtest_start_nomock_futures(default_conf_usdt, mocker,
captured = capsys.readouterr()
assert 'BACKTESTING REPORT' in captured.out
assert 'SELL REASON STATS' in captured.out
assert 'EXIT REASON STATS' in captured.out
assert 'LEFT OPEN TRADES REPORT' in captured.out
@@ -1518,7 +1518,7 @@ def test_backtest_start_multi_strat_nomock_detail(default_conf, mocker,
captured = capsys.readouterr()
assert 'BACKTESTING REPORT' in captured.out
assert 'SELL REASON STATS' in captured.out
assert 'EXIT REASON STATS' in captured.out
assert 'LEFT OPEN TRADES REPORT' in captured.out

View File

@@ -21,7 +21,7 @@ from freqtrade.optimize.optimize_reports import (_get_resample_from_period, gene
generate_strategy_comparison,
generate_trading_stats, show_sorted_pairlist,
store_backtest_stats, text_table_bt_results,
text_table_sell_reason, text_table_strategy)
text_table_exit_reason, text_table_strategy)
from freqtrade.resolvers.strategy_resolver import StrategyResolver
from tests.conftest import CURRENT_TEST_STRATEGY
from tests.data.test_history import _backup_file, _clean_test_file
@@ -281,7 +281,7 @@ def test_text_table_sell_reason():
)
result_str = (
'| Sell Reason | Sells | Win Draws Loss Win% | Avg Profit % | Cum Profit % |'
'| Exit Reason | Exits | Win Draws Loss Win% | Avg Profit % | Cum Profit % |'
' Tot Profit BTC | Tot Profit % |\n'
'|---------------+---------+--------------------------+----------------+----------------+'
'------------------+----------------|\n'
@@ -293,7 +293,7 @@ def test_text_table_sell_reason():
sell_reason_stats = generate_sell_reason_stats(max_open_trades=2,
results=results)
assert text_table_sell_reason(sell_reason_stats=sell_reason_stats,
assert text_table_exit_reason(sell_reason_stats=sell_reason_stats,
stake_currency='BTC') == result_str