fixed flake8 and mypy errors

This commit is contained in:
Aezo Teo
2021-12-29 21:48:50 +08:00
parent b6092e2e3c
commit ee7cbcd69f
4 changed files with 7 additions and 6 deletions

View File

@@ -317,7 +317,8 @@ def test_status_table_handle(default_conf, update, ticker, fee, mocker) -> None:
fields = re.sub('[ ]+', ' ', line[2].strip()).split(' ')
assert int(fields[0]) == 1
assert 'ETH/BTC' in fields[1]
assert 'L' in fields[1]
assert 'ETH/BTC' in fields[2]
assert msg_mock.call_count == 1

View File

@@ -2952,7 +2952,7 @@ def test_execute_trade_exit_down(default_conf_usdt, ticker_usdt, fee, ticker_usd
"is_short,amount,open_rate,current_rate,limit,profit_amount,"
"profit_ratio,profit_or_loss", [
(False, 30, 2.0, 2.3, 2.25, 7.18125, 0.11938903, 'profit'),
(True, 29.70297029, 2.02, 2.2, 2.25, -7.14876237, -0.11944465, 'loss'), # TODO-lev
(True, 29.70297029, 2.02, 2.2, 2.25, -7.14876237, -0.11944465, 'loss'), # TODO-lev
])
def test_execute_trade_exit_custom_exit_price(
default_conf_usdt, ticker_usdt, fee, ticker_usdt_sell_up, is_short, amount, open_rate,
@@ -3190,6 +3190,7 @@ def test_execute_trade_exit_with_stoploss_on_exchange(
assert cancel_order.call_count == 1
assert rpc_mock.call_count == 3
# TODO-lev: add short, RPC short, short fill
def test_may_execute_trade_exit_after_stoploss_on_exchange_hit(default_conf_usdt, ticker_usdt, fee,
mocker) -> None: