mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
reorg test structure to match tox and CI jobs, drop bumpversion for bump-my-version and move config to pyproject.toml, fix docs building
This commit is contained in:
29
tests/core/network/conftest.py
Normal file
29
tests/core/network/conftest.py
Normal file
@ -0,0 +1,29 @@
|
||||
import pytest
|
||||
|
||||
from libp2p.tools.factories import (
|
||||
net_stream_pair_factory,
|
||||
swarm_conn_pair_factory,
|
||||
swarm_pair_factory,
|
||||
)
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
async def net_stream_pair(security_protocol):
|
||||
async with net_stream_pair_factory(
|
||||
security_protocol=security_protocol
|
||||
) as net_stream_pair:
|
||||
yield net_stream_pair
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
async def swarm_pair(security_protocol):
|
||||
async with swarm_pair_factory(security_protocol=security_protocol) as swarms:
|
||||
yield swarms
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
async def swarm_conn_pair(security_protocol):
|
||||
async with swarm_conn_pair_factory(
|
||||
security_protocol=security_protocol
|
||||
) as swarm_conn_pair:
|
||||
yield swarm_conn_pair
|
||||
Reference in New Issue
Block a user