test: Simplify live test setup

This commit is contained in:
Matthias
2026-02-12 19:33:50 +01:00
parent a831a6ee34
commit b190079aa8
+3 -1
View File
@@ -18,6 +18,7 @@ class TestExchangeOnlineSetup(TypedDict):
timeframe: str timeframe: str
candle_count: int candle_count: int
futures: bool futures: bool
futures_only: bool | None
futures_pair: str | None futures_pair: str | None
candle_count_futures: int | None candle_count_futures: int | None
hasQuoteVolumeFutures: bool | None hasQuoteVolumeFutures: bool | None
@@ -574,6 +575,7 @@ EXCHANGES: dict[str, TestExchangeOnlineSetup] = {
} }
EXCHANGES_FUTURES = [exch for exch, params in EXCHANGES.items() if params.get("futures")] EXCHANGES_FUTURES = [exch for exch, params in EXCHANGES.items() if params.get("futures")]
EXCHANGES_SPOT = [exch for exch, params in EXCHANGES.items() if not params.get("futures_only")]
@pytest.fixture(scope="class") @pytest.fixture(scope="class")
@@ -643,7 +645,7 @@ def get_futures_exchange(exchange_name, exchange_conf, class_mocker):
return exchange, exchange_name return exchange, exchange_name
@pytest.fixture(params=EXCHANGES, scope="class") @pytest.fixture(params=EXCHANGES_SPOT, scope="class")
def exchange(request, exchange_conf, class_mocker): def exchange(request, exchange_conf, class_mocker):
exchange, name, exchange_params = get_exchange( exchange, name, exchange_params = get_exchange(
request.param, exchange_conf, class_mocker request.param, exchange_conf, class_mocker