mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2026-04-08 23:11:27 +00:00
Add the missing tests
This commit is contained in:
14
tests/network/conftest.py
Normal file
14
tests/network/conftest.py
Normal file
@ -0,0 +1,14 @@
|
||||
import asyncio
|
||||
|
||||
import pytest
|
||||
|
||||
from tests.factories import net_stream_pair_factory
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
async def net_stream_pair():
|
||||
stream_0, host_0, stream_1, host_1 = await net_stream_pair_factory()
|
||||
try:
|
||||
yield stream_0, stream_1
|
||||
finally:
|
||||
await asyncio.gather(*[host_0.close(), host_1.close()])
|
||||
Reference in New Issue
Block a user