mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
Rename tabulate methods
they don't "generate" anything
This commit is contained in:
@@ -7,8 +7,8 @@ from arrow import Arrow
|
||||
from freqtrade.edge import PairInfo
|
||||
from freqtrade.optimize.optimize_reports import (
|
||||
generate_pair_metrics, generate_edge_table, generate_sell_reason_stats,
|
||||
generate_text_table, generate_text_table_sell_reason, generate_strategy_metrics,
|
||||
generate_text_table_strategy, store_backtest_result)
|
||||
generate_text_table, text_table_sell_reason, generate_strategy_metrics,
|
||||
text_table_strategy, store_backtest_result)
|
||||
from freqtrade.strategy.interface import SellType
|
||||
from tests.conftest import patch_exchange
|
||||
|
||||
@@ -69,7 +69,7 @@ def test_generate_pair_metrics(default_conf, mocker):
|
||||
pytest.approx(pair_results[-1]['profit_sum_pct']) == pair_results[-1]['profit_sum'] * 100)
|
||||
|
||||
|
||||
def test_generate_text_table_sell_reason(default_conf):
|
||||
def test_text_table_sell_reason(default_conf):
|
||||
|
||||
results = pd.DataFrame(
|
||||
{
|
||||
@@ -97,8 +97,8 @@ def test_generate_text_table_sell_reason(default_conf):
|
||||
|
||||
sell_reason_stats = generate_sell_reason_stats(max_open_trades=2,
|
||||
results=results)
|
||||
assert generate_text_table_sell_reason(sell_reason_stats=sell_reason_stats,
|
||||
stake_currency='BTC') == result_str
|
||||
assert text_table_sell_reason(sell_reason_stats=sell_reason_stats,
|
||||
stake_currency='BTC') == result_str
|
||||
|
||||
|
||||
def test_generate_sell_reason_stats(default_conf):
|
||||
@@ -136,7 +136,7 @@ def test_generate_sell_reason_stats(default_conf):
|
||||
assert stop_result['profit_mean_pct'] == round(stop_result['profit_mean'] * 100, 2)
|
||||
|
||||
|
||||
def test_generate_text_table_strategy(default_conf, mocker):
|
||||
def test_text_table_strategy(default_conf, mocker):
|
||||
results = {}
|
||||
results['TestStrategy1'] = pd.DataFrame(
|
||||
{
|
||||
@@ -178,7 +178,7 @@ def test_generate_text_table_strategy(default_conf, mocker):
|
||||
max_open_trades=2,
|
||||
all_results=results)
|
||||
|
||||
assert generate_text_table_strategy(strategy_results, 'BTC') == result_str
|
||||
assert text_table_strategy(strategy_results, 'BTC') == result_str
|
||||
|
||||
|
||||
def test_generate_edge_table(edge_conf, mocker):
|
||||
|
||||
Reference in New Issue
Block a user