Removed some todo-lev comments

This commit is contained in:
Sam Germain 2022-01-01 10:34:33 -06:00
parent ddfbe55e7c
commit 33ab3c1bea
6 changed files with 17 additions and 18 deletions

View File

@ -26,7 +26,6 @@ class Bybit(Exchange):
_supported_trading_mode_collateral_pairs: List[Tuple[TradingMode, Collateral]] = [
# TradingMode.SPOT always supported and not required in this list
# TODO-lev: Uncomment once supported
# (TradingMode.FUTURES, Collateral.CROSS),
# (TradingMode.FUTURES, Collateral.ISOLATED)
]

View File

@ -27,7 +27,6 @@ class Ftx(Exchange):
_supported_trading_mode_collateral_pairs: List[Tuple[TradingMode, Collateral]] = [
# TradingMode.SPOT always supported and not required in this list
# TODO-lev: Uncomment once supported
# (TradingMode.MARGIN, Collateral.CROSS),
# (TradingMode.FUTURES, Collateral.CROSS)
]

View File

@ -68,7 +68,6 @@ class FreqtradeBot(LoggingMixin):
init_db(self.config.get('db_url', None), clean_open_orders=self.config['dry_run'])
# TODO-lev: Do anything with this?
self.wallets = Wallets(self.config, self.exchange)
PairLocks.timeframe = self.config['timeframe']
@ -1133,7 +1132,6 @@ class FreqtradeBot(LoggingMixin):
Buy cancel - cancel order
:return: True if order was fully cancelled
"""
# TODO-lev: Pay back borrowed/interest and transfer back on leveraged trades
was_trade_fully_canceled = False
# Cancelled orders may have the status of 'canceled' or 'closed'

View File

@ -22,9 +22,6 @@ from tests.conftest import (CURRENT_TEST_STRATEGY, get_args, log_has, log_has_re
patched_configuration_load_config_file)
# TODO-lev: This file
def test_setup_hyperopt_configuration_without_arguments(mocker, default_conf, caplog) -> None:
patched_configuration_load_config_file(mocker, default_conf)

View File

@ -2961,7 +2961,7 @@ def test_execute_trade_exit_down(default_conf_usdt, ticker_usdt, fee, ticker_usd
@pytest.mark.parametrize(
"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'),
])
def test_execute_trade_exit_custom_exit_price(
default_conf_usdt, ticker_usdt, fee, ticker_usdt_sell_up, is_short, amount, open_rate,

View File

@ -1893,17 +1893,20 @@ def test_total_open_trades_stakes(fee, is_short, use_db):
@pytest.mark.usefixtures("init_persistence")
# TODO-lev: @pytest.mark.parametrize('is_short', [True, False])
@pytest.mark.parametrize('is_short,result', [
(True, -0.006739127),
(False, 0.000739127),
])
@pytest.mark.parametrize('use_db', [True, False])
def test_get_total_closed_profit(fee, use_db):
def test_get_total_closed_profit(fee, use_db, is_short, result):
Trade.use_db = use_db
Trade.reset_trades()
res = Trade.get_total_closed_profit()
assert res == 0
create_mock_trades(fee, False, use_db)
create_mock_trades(fee, is_short, use_db)
res = Trade.get_total_closed_profit()
assert res == 0.000739127
assert res == result
Trade.use_db = True
@ -1956,17 +1959,20 @@ def test_get_overall_performance(fee):
@pytest.mark.usefixtures("init_persistence")
# TODO-lev: @pytest.mark.parametrize('is_short', [True, False])
def test_get_best_pair(fee):
@pytest.mark.parametrize('is_short,pair,profit', [
(True, 'ETC/BTC', -0.005),
(False, 'XRP/BTC', 0.01),
])
def test_get_best_pair(fee, is_short, pair, profit):
res = Trade.get_best_pair()
assert res is None
create_mock_trades(fee, False)
create_mock_trades(fee, is_short)
res = Trade.get_best_pair()
assert len(res) == 2
assert res[0] == 'XRP/BTC'
assert res[1] == 0.01
assert res[0] == pair
assert res[1] == profit
@pytest.mark.usefixtures("init_persistence")