Skip to content

Commit

Permalink
Use relative imports for test-local files
Browse files Browse the repository at this point in the history
  • Loading branch information
Peque committed Feb 26, 2019
1 parent 9b7b83b commit 25537ed
Show file tree
Hide file tree
Showing 17 changed files with 37 additions and 37 deletions.
Empty file added osbrain/tests/__init__.py
Empty file.
12 changes: 6 additions & 6 deletions osbrain/tests/test_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@
from osbrain.helper import sync_agent_logger
from osbrain.helper import wait_agent_attr

from common import nsproxy # noqa: F401
from common import append_received
from common import set_received
from .common import nsproxy # noqa: F401
from .common import append_received
from .common import set_received

from common import skip_windows_spawn
from common import skip_windows_any_port
from common import skip_windows_port_reuse
from .common import skip_windows_spawn
from .common import skip_windows_any_port
from .common import skip_windows_port_reuse


def test_agent_uuid():
Expand Down
4 changes: 2 additions & 2 deletions osbrain/tests/test_agent_async_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from osbrain.helper import logger_received
from osbrain.helper import wait_agent_attr

from common import nsproxy # noqa: F401
from common import append_received
from .common import nsproxy # noqa: F401
from .common import append_received


def on_error(agent):
Expand Down
4 changes: 2 additions & 2 deletions osbrain/tests/test_agent_async_requests_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from osbrain import run_agent
from osbrain.helper import wait_agent_attr

from common import nsproxy # noqa: F401
from common import append_received
from .common import nsproxy # noqa: F401
from .common import append_received


class ServerAsyncRep(Agent):
Expand Down
4 changes: 2 additions & 2 deletions osbrain/tests/test_agent_ipc_sockets.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
from osbrain.helper import agent_dies
from osbrain.helper import wait_condition

from common import nsproxy # noqa: F401
from common import skip_windows_ipc
from .common import nsproxy # noqa: F401
from .common import skip_windows_ipc

pytestmark = skip_windows_ipc

Expand Down
4 changes: 2 additions & 2 deletions osbrain/tests/test_agent_pubsub_topics.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
from osbrain.helper import wait_agent_condition
from osbrain.helper import last_received_endswith

from common import nsproxy # noqa: F401
from common import append_received
from .common import nsproxy # noqa: F401
from .common import append_received


@pytest.mark.parametrize(
Expand Down
2 changes: 1 addition & 1 deletion osbrain/tests/test_agent_req_rep.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from osbrain.helper import logger_received
from osbrain.helper import sync_agent_logger

from common import nsproxy # noqa: F401
from .common import nsproxy # noqa: F401


def test_return(nsproxy):
Expand Down
4 changes: 2 additions & 2 deletions osbrain/tests/test_agent_serialization.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
from osbrain.address import AgentAddressSerializer
from osbrain.helper import wait_agent_attr

from common import nsproxy # noqa: F401
from common import set_received
from .common import nsproxy # noqa: F401
from .common import set_received


def test_compose_message():
Expand Down
4 changes: 2 additions & 2 deletions osbrain/tests/test_agent_sync_publications.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
from osbrain.helper import wait_agent_attr
from osbrain.helper import wait_agent_condition

from common import nsproxy # noqa: F401
from common import append_received
from .common import nsproxy # noqa: F401
from .common import append_received


class BaseServer(Agent):
Expand Down
4 changes: 2 additions & 2 deletions osbrain/tests/test_agent_sync_publications_handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from osbrain import run_agent
from osbrain.helper import wait_agent_attr

from common import nsproxy # noqa: F401
from common import append_received
from .common import nsproxy # noqa: F401
from .common import append_received


class ServerSyncPub(Agent):
Expand Down
8 changes: 4 additions & 4 deletions osbrain/tests/test_agent_transport.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
from osbrain import SocketAddress
from osbrain.helper import wait_agent_attr

from common import nsproxy # noqa: F401
from common import append_received
from common import skip_windows_spawn
from common import skip_windows_ipc
from .common import nsproxy # noqa: F401
from .common import append_received
from .common import skip_windows_spawn
from .common import skip_windows_ipc


def test_agent_bind_transport_platform_default(nsproxy):
Expand Down
2 changes: 1 addition & 1 deletion osbrain/tests/test_bugs.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from osbrain import run_agent
from osbrain.helper import wait_agent_condition

from common import nsproxy # noqa: F401
from .common import nsproxy # noqa: F401


def test_timer_recursion(nsproxy):
Expand Down
4 changes: 2 additions & 2 deletions osbrain/tests/test_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
from osbrain.helper import wait_condition
from osbrain.helper import wait_agent_condition

from common import nsproxy # noqa: F401
from common import agent_logger # noqa: F401
from .common import nsproxy # noqa: F401
from .common import agent_logger # noqa: F401


class SugarAddict():
Expand Down
2 changes: 1 addition & 1 deletion osbrain/tests/test_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from osbrain.logging import pyro_log
from osbrain.helper import logger_received

from common import nsproxy # noqa: F401
from .common import nsproxy # noqa: F401


def test_logging_level(nsproxy):
Expand Down
6 changes: 3 additions & 3 deletions osbrain/tests/test_nameserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@
from osbrain.nameserver import NameServerProcess
from osbrain.nameserver import random_nameserver_process

from common import nsproxy # noqa: F401
from common import skip_windows_any_port
from common import skip_windows_port_reuse
from .common import nsproxy # noqa: F401
from .common import skip_windows_any_port
from .common import skip_windows_port_reuse


def test_nameserver_ping(nsproxy):
Expand Down
4 changes: 2 additions & 2 deletions osbrain/tests/test_proxy.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
from osbrain.proxy import locate_ns
from osbrain.helper import wait_agent_attr

from common import nsproxy # noqa: F401
from common import append_received
from .common import nsproxy # noqa: F401
from .common import append_received


def since(t0, passed, tolerance):
Expand Down
6 changes: 3 additions & 3 deletions osbrain/tests/test_timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
from osbrain.common import repeat
from osbrain.helper import wait_agent_attr

from common import nsproxy # noqa: F401
from common import append_received
from common import set_received
from .common import nsproxy # noqa: F401
from .common import append_received
from .common import set_received


@pytest.mark.timeout(1)
Expand Down

0 comments on commit 25537ed

Please sign in to comment.