flake8 :)

This commit is contained in:
Yazeed Al Oyoun 2020-02-07 03:54:47 +01:00
parent ff819386e1
commit aa2cb937b1
1 changed files with 24 additions and 12 deletions

View File

@ -22,10 +22,14 @@ def test_generate_text_table(default_conf, mocker):
)
result_str = (
'| Pair | Buys | Avg Profit % | Cum Profit % | Tot Profit BTC | Tot Profit % | Avg Duration | Wins | Draws | Losses |\n'
'|:--------|-------:|---------------:|---------------:|-----------------:|---------------:|:---------------|-------:|--------:|---------:|\n'
'| ETH/BTC | 2 | 15.00 | 30.00 | 0.60000000 | 15.00 | 0:20:00 | 2 | 0 | 0 |\n'
'| TOTAL | 2 | 15.00 | 30.00 | 0.60000000 | 15.00 | 0:20:00 | 2 | 0 | 0 |'
'| Pair | Buys | Avg Profit % | Cum Profit % | Tot Profit BTC |'
' Tot Profit % | Avg Duration | Wins | Draws | Losses |\n'
'|:--------|-------:|---------------:|---------------:|-----------------:|'
'---------------:|:---------------|-------:|--------:|---------:|\n'
'| ETH/BTC | 2 | 15.00 | 30.00 | 0.60000000 |'
' 15.00 | 0:20:00 | 2 | 0 | 0 |\n'
'| TOTAL | 2 | 15.00 | 30.00 | 0.60000000 |'
' 15.00 | 0:20:00 | 2 | 0 | 0 |'
)
assert generate_text_table(data={'ETH/BTC': {}},
stake_currency='BTC', max_open_trades=2,
@ -48,10 +52,14 @@ def test_generate_text_table_sell_reason(default_conf, mocker):
)
result_str = (
'| Sell Reason | Sells | Wins | Draws | Losses | Avg Profit % | Cum Profit % | Tot Profit BTC | Tot Profit % |\n'
'|:--------------|--------:|-------:|--------:|---------:|---------------:|---------------:|-----------------:|---------------:|\n'
'| roi | 2 | 2 | 0 | 0 | 15 | 30 | 0.6 | 15 |\n'
'| stop_loss | 1 | 0 | 0 | 1 | -10 | -10 | -0.2 | -5 |'
'| Sell Reason | Sells | Wins | Draws | Losses |'
' Avg Profit % | Cum Profit % | Tot Profit BTC | Tot Profit % |\n'
'|:--------------|--------:|-------:|--------:|---------:|'
'---------------:|---------------:|-----------------:|---------------:|\n'
'| roi | 2 | 2 | 0 | 0 |'
' 15 | 30 | 0.6 | 15 |\n'
'| stop_loss | 1 | 0 | 0 | 1 |'
' -10 | -10 | -0.2 | -5 |'
)
assert generate_text_table_sell_reason(
data={'ETH/BTC': {}},
@ -87,10 +95,14 @@ def test_generate_text_table_strategy(default_conf, mocker):
)
result_str = (
'| Strategy | Buys | Avg Profit % | Cum Profit % | Tot Profit BTC | Tot Profit % | Avg Duration | Wins | Draws | Losses |\n'
'|:--------------|-------:|---------------:|---------------:|-----------------:|---------------:|:---------------|-------:|--------:|---------:|\n'
'| TestStrategy1 | 3 | 20.00 | 60.00 | 1.10000000 | 30.00 | 0:17:00 | 3 | 0 | 0 |\n'
'| TestStrategy2 | 3 | 30.00 | 90.00 | 1.30000000 | 45.00 | 0:20:00 | 3 | 0 | 0 |'
'| Strategy | Buys | Avg Profit % | Cum Profit % | Tot'
' Profit BTC | Tot Profit % | Avg Duration | Wins | Draws | Losses |\n'
'|:--------------|-------:|---------------:|---------------:|------'
'-----------:|---------------:|:---------------|-------:|--------:|---------:|\n'
'| TestStrategy1 | 3 | 20.00 | 60.00 | '
' 1.10000000 | 30.00 | 0:17:00 | 3 | 0 | 0 |\n'
'| TestStrategy2 | 3 | 30.00 | 90.00 | '
' 1.30000000 | 45.00 | 0:20:00 | 3 | 0 | 0 |'
)
assert generate_text_table_strategy('BTC', 2, all_results=results) == result_str