output duration in a more readable way

This commit is contained in:
Matthias
2018-07-18 20:08:55 +02:00
parent f9f6a3bd04
commit 79b1030435
2 changed files with 10 additions and 9 deletions

View File

@@ -392,15 +392,14 @@ def test_generate_text_table(default_conf, mocker):
result_str = (
'| 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 | 30.00 | '
'0.60000000 | 20.0 | 2 | 0 |\n'
'0.60000000 | 0:20:00 | 2 | 0 |\n'
'| TOTAL | 2 | 15.00 | 30.00 | '
'0.60000000 | 20.0 | 2 | 0 |'
'0.60000000 | 0:20:00 | 2 | 0 |'
)
print(result_str)
assert backtesting._generate_text_table(data={'ETH/BTC': {}}, results=results) == result_str