Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
Nusnus committed Oct 9, 2023
1 parent 4526e45 commit a5dfcae
Show file tree
Hide file tree
Showing 20 changed files with 26 additions and 23 deletions.
6 changes: 3 additions & 3 deletions src/pytest_celery/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
from pytest_celery.api import CeleryTestSetup
from pytest_celery.api import CeleryTestWorker
from pytest_celery.api import CeleryWorkerCluster
from pytest_celery.api import CeleryWorkerContainer
from pytest_celery.api import RabbitMQContainer
from pytest_celery.api import RedisContainer

Check warning on line 24 in src/pytest_celery/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/pytest_celery/__init__.py#L22-L24

Added lines #L22 - L24 were not covered by tests
from pytest_celery.components import RabbitMQTestBroker
from pytest_celery.components import RedisTestBackend
from pytest_celery.components import RedisTestBroker
Expand Down Expand Up @@ -58,9 +61,6 @@
from pytest_celery.components import default_worker_signals
from pytest_celery.components import default_worker_tasks
from pytest_celery.components import default_worker_volume
from pytest_celery.containers import CeleryWorkerContainer
from pytest_celery.containers import RabbitMQContainer
from pytest_celery.containers import RedisContainer
from pytest_celery.fixtures import celery_backend
from pytest_celery.fixtures import celery_backend_cluster
from pytest_celery.fixtures import celery_backend_cluster_config
Expand Down
3 changes: 3 additions & 0 deletions src/pytest_celery/api/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
from pytest_celery.api.broker import CeleryBrokerCluster
from pytest_celery.api.broker import CeleryTestBroker

Check warning on line 8 in src/pytest_celery/api/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/pytest_celery/api/__init__.py#L3-L8

Added lines #L3 - L8 were not covered by tests
from pytest_celery.api.container import CeleryTestContainer
from pytest_celery.api.containers.rabbitmq import RabbitMQContainer
from pytest_celery.api.containers.redis import RedisContainer
from pytest_celery.api.containers.worker import CeleryWorkerContainer

Check warning on line 12 in src/pytest_celery/api/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/pytest_celery/api/__init__.py#L10-L12

Added lines #L10 - L12 were not covered by tests
from pytest_celery.api.setup import CeleryTestSetup
from pytest_celery.api.worker import CeleryTestWorker
from pytest_celery.api.worker import CeleryWorkerCluster

Check warning on line 15 in src/pytest_celery/api/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/pytest_celery/api/__init__.py#L14-L15

Added lines #L14 - L15 were not covered by tests
5 changes: 5 additions & 0 deletions src/pytest_celery/api/containers/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# flake8: noqa

from pytest_celery.api.containers.rabbitmq import RabbitMQContainer
from pytest_celery.api.containers.redis import RedisContainer
from pytest_celery.api.containers.worker import CeleryWorkerContainer

Check warning on line 5 in src/pytest_celery/api/containers/__init__.py

View check run for this annotation

Codecov / codecov/patch

src/pytest_celery/api/containers/__init__.py#L3-L5

Added lines #L3 - L5 were not covered by tests
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion src/pytest_celery/api/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from pytest_celery.api.base import CeleryTestCluster
from pytest_celery.api.base import CeleryTestNode

Check warning on line 9 in src/pytest_celery/api/worker.py

View check run for this annotation

Codecov / codecov/patch

src/pytest_celery/api/worker.py#L8-L9

Added lines #L8 - L9 were not covered by tests
from pytest_celery.api.container import CeleryTestContainer
from pytest_celery.containers.worker import CeleryWorkerContainer
from pytest_celery.api.containers.worker import CeleryWorkerContainer

Check warning on line 11 in src/pytest_celery/api/worker.py

View check run for this annotation

Codecov / codecov/patch

src/pytest_celery/api/worker.py#L11

Added line #L11 was not covered by tests


class CeleryTestWorker(CeleryTestNode):
Expand Down
2 changes: 1 addition & 1 deletion src/pytest_celery/components/backend/redis/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from pytest_docker_tools import fxtr

from pytest_celery import defaults
from pytest_celery.api.containers.redis import RedisContainer

Check warning on line 10 in src/pytest_celery/components/backend/redis/fixtures.py

View check run for this annotation

Codecov / codecov/patch

src/pytest_celery/components/backend/redis/fixtures.py#L10

Added line #L10 was not covered by tests
from pytest_celery.components.backend.redis.api import RedisTestBackend
from pytest_celery.containers.redis import RedisContainer


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion src/pytest_celery/components/broker/rabbitmq/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from pytest_docker_tools import fxtr

from pytest_celery import defaults
from pytest_celery.api.containers.rabbitmq import RabbitMQContainer

Check warning on line 10 in src/pytest_celery/components/broker/rabbitmq/fixtures.py

View check run for this annotation

Codecov / codecov/patch

src/pytest_celery/components/broker/rabbitmq/fixtures.py#L10

Added line #L10 was not covered by tests
from pytest_celery.components.broker.rabbitmq.api import RabbitMQTestBroker
from pytest_celery.containers.rabbitmq import RabbitMQContainer


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion src/pytest_celery/components/broker/redis/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from pytest_docker_tools import fxtr

from pytest_celery import defaults
from pytest_celery.api.containers.redis import RedisContainer

Check warning on line 10 in src/pytest_celery/components/broker/redis/fixtures.py

View check run for this annotation

Codecov / codecov/patch

src/pytest_celery/components/broker/redis/fixtures.py#L10

Added line #L10 was not covered by tests
from pytest_celery.components.broker.redis.api import RedisTestBroker
from pytest_celery.containers.redis import RedisContainer


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion src/pytest_celery/components/worker/fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
from pytest_docker_tools import volume

from pytest_celery import defaults
from pytest_celery.api.containers.worker import CeleryWorkerContainer
from pytest_celery.api.worker import CeleryTestWorker

Check warning on line 14 in src/pytest_celery/components/worker/fixtures.py

View check run for this annotation

Codecov / codecov/patch

src/pytest_celery/components/worker/fixtures.py#L13-L14

Added lines #L13 - L14 were not covered by tests
from pytest_celery.containers.worker import CeleryWorkerContainer


@pytest.fixture
Expand Down
5 changes: 0 additions & 5 deletions src/pytest_celery/containers/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from pytest_docker_tools import fxtr

from pytest_celery import defaults
from pytest_celery.api.containers.worker import CeleryWorkerContainer
from pytest_celery.api.worker import CeleryTestWorker
from pytest_celery.containers.worker import CeleryWorkerContainer


class Celery4WorkerContainer(CeleryWorkerContainer):
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/api/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pytest_celery import CeleryTestWorker
from pytest_celery import CeleryWorkerCluster
from pytest_celery import defaults
from pytest_celery.containers.worker import CeleryWorkerContainer
from pytest_celery.api.containers.worker import CeleryWorkerContainer


@pytest.mark.parametrize("node", [lazy_fixture(defaults.CELERY_WORKER)])
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pytest_docker_tools import fxtr

from pytest_celery import defaults
from pytest_celery.containers.worker import CeleryWorkerContainer
from pytest_celery.api.containers.worker import CeleryWorkerContainer


class IntegrationWorkerContainer(CeleryWorkerContainer):
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/setup/custom/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
from pytest_docker_tools import fxtr

from pytest_celery import defaults
from pytest_celery.api.containers.worker import CeleryWorkerContainer
from pytest_celery.api.worker import CeleryTestWorker
from pytest_celery.api.worker import CeleryWorkerCluster
from pytest_celery.containers.worker import CeleryWorkerContainer
from tests.conftest import Celery5WorkerContainer


Expand Down
2 changes: 1 addition & 1 deletion tests/smoke/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from pytest_docker_tools import fxtr

from pytest_celery import defaults
from pytest_celery.containers.worker import CeleryWorkerContainer
from pytest_celery.api.containers.worker import CeleryWorkerContainer


@pytest.fixture
Expand Down
2 changes: 1 addition & 1 deletion tests/smoke/test_failover.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
from pytest_celery import CeleryTestSetup
from pytest_celery import defaults
from pytest_celery.api.broker import CeleryBrokerCluster
from pytest_celery.api.containers.rabbitmq import RabbitMQContainer
from pytest_celery.components.broker.rabbitmq.api import RabbitMQTestBroker
from pytest_celery.containers.rabbitmq import RabbitMQContainer
from tests.tasks import identity

failover_broker = container(
Expand Down
6 changes: 3 additions & 3 deletions tests/unit/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
from pytest_docker_tools import volume

from pytest_celery import defaults
from pytest_celery.api.containers.rabbitmq import RabbitMQContainer
from pytest_celery.api.containers.redis import RedisContainer
from pytest_celery.api.containers.worker import CeleryWorkerContainer
from pytest_celery.api.worker import CeleryTestWorker
from pytest_celery.components.backend.redis.api import RedisTestBackend
from pytest_celery.components.broker.rabbitmq.api import RabbitMQTestBroker
from pytest_celery.components.broker.redis.api import RedisTestBroker
from pytest_celery.containers.rabbitmq import RabbitMQContainer
from pytest_celery.containers.redis import RedisContainer
from pytest_celery.containers.worker import CeleryWorkerContainer
from tests.unit.docker.api import UnitTestContainer
from tests.unit.docker.api import UnitWorkerContainer

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/docker/api.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from typing import Any

from pytest_celery import CeleryTestContainer
from pytest_celery.containers.worker import CeleryWorkerContainer
from pytest_celery.api.containers.worker import CeleryWorkerContainer


class UnitTestContainer(CeleryTestContainer):
Expand Down

0 comments on commit a5dfcae

Please sign in to comment.