fix tests for backtest-result output table

This commit is contained in:
Matthias 2018-07-08 19:55:16 +02:00
parent 1a24afef77
commit 38487644f0

View File

@ -391,15 +391,16 @@ def test_generate_text_table(default_conf, mocker):
) )
result_str = ( result_str = (
'| pair | buy count | avg profit % | ' '| pair | buy count | avg profit % | cum profit % | '
'total profit BTC | avg duration | profit | loss |\n' 'total profit BTC | avg duration | profit | loss |\n'
'|:--------|------------:|---------------:|' '|:--------|------------:|---------------:|---------------:|'
'-------------------:|---------------:|---------:|-------:|\n' '-------------------:|---------------:|---------:|-------:|\n'
'| ETH/BTC | 2 | 15.00 | ' '| ETH/BTC | 2 | 15.00 | 30.00 | '
'0.60000000 | 20.0 | 2 | 0 |\n' '0.60000000 | 20.0 | 2 | 0 |\n'
'| TOTAL | 2 | 15.00 | ' '| TOTAL | 2 | 15.00 | 30.00 | '
'0.60000000 | 20.0 | 2 | 0 |' '0.60000000 | 20.0 | 2 | 0 |'
) )
print(result_str)
assert backtesting._generate_text_table(data={'ETH/BTC': {}}, results=results) == result_str assert backtesting._generate_text_table(data={'ETH/BTC': {}}, results=results) == result_str