flake8 :)
This commit is contained in:
parent
ff819386e1
commit
aa2cb937b1
@ -22,10 +22,14 @@ def test_generate_text_table(default_conf, mocker):
|
|||||||
)
|
)
|
||||||
|
|
||||||
result_str = (
|
result_str = (
|
||||||
'| Pair | Buys | Avg Profit % | Cum Profit % | Tot Profit BTC | Tot Profit % | Avg Duration | Wins | Draws | Losses |\n'
|
'| Pair | Buys | Avg Profit % | Cum Profit % | Tot Profit BTC |'
|
||||||
'|:--------|-------:|---------------:|---------------:|-----------------:|---------------:|:---------------|-------:|--------:|---------:|\n'
|
' Tot Profit % | Avg Duration | Wins | Draws | Losses |\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 |'
|
'---------------:|:---------------|-------:|--------:|---------:|\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': {}},
|
assert generate_text_table(data={'ETH/BTC': {}},
|
||||||
stake_currency='BTC', max_open_trades=2,
|
stake_currency='BTC', max_open_trades=2,
|
||||||
@ -48,10 +52,14 @@ def test_generate_text_table_sell_reason(default_conf, mocker):
|
|||||||
)
|
)
|
||||||
|
|
||||||
result_str = (
|
result_str = (
|
||||||
'| Sell Reason | Sells | Wins | Draws | Losses | Avg Profit % | Cum Profit % | Tot Profit BTC | Tot Profit % |\n'
|
'| Sell Reason | Sells | Wins | Draws | Losses |'
|
||||||
'|:--------------|--------:|-------:|--------:|---------:|---------------:|---------------:|-----------------:|---------------:|\n'
|
' Avg Profit % | Cum Profit % | Tot Profit BTC | Tot Profit % |\n'
|
||||||
'| roi | 2 | 2 | 0 | 0 | 15 | 30 | 0.6 | 15 |\n'
|
'|:--------------|--------:|-------:|--------:|---------:|'
|
||||||
'| stop_loss | 1 | 0 | 0 | 1 | -10 | -10 | -0.2 | -5 |'
|
'---------------:|---------------:|-----------------:|---------------:|\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(
|
assert generate_text_table_sell_reason(
|
||||||
data={'ETH/BTC': {}},
|
data={'ETH/BTC': {}},
|
||||||
@ -87,10 +95,14 @@ def test_generate_text_table_strategy(default_conf, mocker):
|
|||||||
)
|
)
|
||||||
|
|
||||||
result_str = (
|
result_str = (
|
||||||
'| Strategy | Buys | Avg Profit % | Cum Profit % | Tot Profit BTC | Tot Profit % | Avg Duration | Wins | Draws | Losses |\n'
|
'| Strategy | Buys | Avg Profit % | Cum Profit % | Tot'
|
||||||
'|:--------------|-------:|---------------:|---------------:|-----------------:|---------------:|:---------------|-------:|--------:|---------:|\n'
|
' Profit BTC | Tot Profit % | Avg Duration | Wins | Draws | Losses |\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 |'
|
'-----------:|---------------:|:---------------|-------:|--------:|---------:|\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
|
assert generate_text_table_strategy('BTC', 2, all_results=results) == result_str
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user