fix(tests): use CandleType.FUTURES in test_ohlcv_limit_futures
The futures_only ternary incorrectly used CandleType.SPOT for exchanges that support both spot and futures (binance, gate), causing candle limit mismatch against candle_count_futures.
This commit is contained in:
@@ -64,8 +64,7 @@ class TestCCXTExchange:
|
|||||||
if not expected_count:
|
if not expected_count:
|
||||||
pytest.skip("No expected candle count for exchange")
|
pytest.skip("No expected candle count for exchange")
|
||||||
|
|
||||||
candle_type = CandleType.FUTURES if exchange_params.get("futures_only") else CandleType.SPOT
|
assert exch.ohlcv_candle_limit("1m", CandleType.FUTURES) == expected_count
|
||||||
assert exch.ohlcv_candle_limit("1m", candle_type) == expected_count
|
|
||||||
|
|
||||||
def test_load_markets_futures(self, exchange_futures: EXCHANGE_FIXTURE_TYPE):
|
def test_load_markets_futures(self, exchange_futures: EXCHANGE_FIXTURE_TYPE):
|
||||||
exchange, _, exchange_params = exchange_futures
|
exchange, _, exchange_params = exchange_futures
|
||||||
|
|||||||
Reference in New Issue
Block a user