Skip to content

Commit

Permalink
test: make test case name better
Browse files Browse the repository at this point in the history
  • Loading branch information
antazoey committed May 2, 2024
1 parent f3902c5 commit 3853784
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@ def networks():
return ape.networks


@pytest.fixture(params=[(name, net) for name, values in NETWORKS.items() for net in values])
# NOTE: Using a `str` as param for better pytest test-case name generation.
@pytest.fixture(params=[f"{e}:{n}" for e, values in NETWORKS.items() for n in values])
def provider(networks, request):
ecosystem_cls = networks.get_ecosystem(request.param[0])
network_cls = ecosystem_cls.get_network(request.param[1])
ecosystem, network = request.param.split(":")
ecosystem_cls = networks.get_ecosystem(ecosystem)
network_cls = ecosystem_cls.get_network(network)
with network_cls.use_provider("infura") as provider:
yield provider

0 comments on commit 3853784

Please sign in to comment.