Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
mmsqe committed Dec 21, 2023
1 parent 20b9791 commit 7eb4226
Show file tree
Hide file tree
Showing 5 changed files with 115 additions and 193 deletions.
31 changes: 13 additions & 18 deletions integration_tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from pathlib import Path

import pytest
from pytest_lazyfixture import lazy_fixture

from .network import setup_cronos, setup_custom_cronos, setup_geth

Expand Down Expand Up @@ -76,23 +75,19 @@ def geth(tmp_path_factory):
yield from setup_geth(path, 8545)


@pytest.fixture(scope="session")
def cronos_ws(cronos):
cronos_ws = cronos.copy()
cronos_ws.use_websocket()
yield cronos_ws


@pytest.fixture(
scope="session",
params=[
lazy_fixture("cronos"),
lazy_fixture("geth"),
lazy_fixture("cronos_ws"),
],
)
def cluster(request):
@pytest.fixture(scope="session", params=["cronos", "geth", "cronos-ws"])
def cluster(request, cronos, geth):
"""
run on both cronos and geth
"""
yield request.param
provider = request.param
if provider == "cronos":
yield cronos
elif provider == "geth":
yield geth
elif provider == "cronos-ws":
cronos_ws = cronos.copy()
cronos_ws.use_websocket()
yield cronos_ws
else:
raise NotImplementedError
Loading

0 comments on commit 7eb4226

Please sign in to comment.