mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Move test utilities to tools (#356)
* move test factories to libp2p/tools * remove unused inits * move pubsub test utils to tools * cleanup test_interop * fix typing libp2p/tools/utils * add typing to pubsub utils * fix factories typing * fix typing for floodsub_integration_test_settings * fix rest of the typing * fix isort
This commit is contained in:
@ -2,7 +2,7 @@ import asyncio
|
||||
|
||||
import pytest
|
||||
|
||||
from tests.factories import (
|
||||
from libp2p.tools.factories import (
|
||||
net_stream_pair_factory,
|
||||
swarm_conn_pair_factory,
|
||||
swarm_pair_factory,
|
||||
|
||||
@ -3,7 +3,7 @@ import asyncio
|
||||
import pytest
|
||||
|
||||
from libp2p.network.stream.exceptions import StreamClosed, StreamEOF, StreamReset
|
||||
from tests.constants import MAX_READ_LEN
|
||||
from libp2p.tools.constants import MAX_READ_LEN
|
||||
|
||||
DATA = b"data_123"
|
||||
|
||||
|
||||
@ -15,9 +15,9 @@ import enum
|
||||
import pytest
|
||||
|
||||
from libp2p.network.notifee_interface import INotifee
|
||||
from tests.configs import LISTEN_MADDR
|
||||
from tests.factories import SwarmFactory
|
||||
from tests.utils import connect_swarm
|
||||
from libp2p.tools.constants import LISTEN_MADDR
|
||||
from libp2p.tools.factories import SwarmFactory
|
||||
from libp2p.tools.utils import connect_swarm
|
||||
|
||||
|
||||
class Event(enum.Enum):
|
||||
|
||||
@ -3,8 +3,8 @@ import asyncio
|
||||
import pytest
|
||||
|
||||
from libp2p.network.exceptions import SwarmException
|
||||
from tests.factories import SwarmFactory
|
||||
from tests.utils import connect_swarm
|
||||
from libp2p.tools.factories import SwarmFactory
|
||||
from libp2p.tools.utils import connect_swarm
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
|
||||
Reference in New Issue
Block a user