From 37881da08ebedf0f2d0c6c2b267bdb47818a0da1 Mon Sep 17 00:00:00 2001 From: Matthias Bisping Date: Tue, 26 Apr 2022 12:45:12 +0200 Subject: [PATCH] restructuring: moved test out of module scope --- pyinfra/locations.py | 2 +- {pyinfra/test => test}/__init__.py | 0 {pyinfra/test => test}/config.py | 0 {pyinfra/test => test}/config.yaml | 0 {pyinfra/test => test}/exploration_tests/__init__.py | 0 .../exploration_tests/data_json_request_test.py | 0 {pyinfra/test => test}/queue/__init__.py | 0 {pyinfra/test => test}/queue/queue_manager_mock.py | 2 +- {pyinfra/test => test}/queue/queue_mock.py | 0 {pyinfra/test => test}/storage/__init__.py | 0 {pyinfra/test => test}/storage/adapter_mock.py | 2 +- {pyinfra/test => test}/storage/client_mock.py | 0 {pyinfra/test => test}/unit_tests/__init__.py | 0 {pyinfra/test => test}/unit_tests/azure_adapter_test.py | 2 +- {pyinfra/test => test}/unit_tests/config_test.py | 0 {pyinfra/test => test}/unit_tests/conftest.py | 8 ++++---- {pyinfra/test => test}/unit_tests/consumer_test.py | 0 {pyinfra/test => test}/unit_tests/queue_visitor_test.py | 0 {pyinfra/test => test}/unit_tests/storage_test.py | 0 19 files changed, 8 insertions(+), 8 deletions(-) rename {pyinfra/test => test}/__init__.py (100%) rename {pyinfra/test => test}/config.py (100%) rename {pyinfra/test => test}/config.yaml (100%) rename {pyinfra/test => test}/exploration_tests/__init__.py (100%) rename pyinfra/test/exploration_tests/request_test.py => test/exploration_tests/data_json_request_test.py (100%) rename {pyinfra/test => test}/queue/__init__.py (100%) rename {pyinfra/test => test}/queue/queue_manager_mock.py (96%) rename {pyinfra/test => test}/queue/queue_mock.py (100%) rename {pyinfra/test => test}/storage/__init__.py (100%) rename {pyinfra/test => test}/storage/adapter_mock.py (94%) rename {pyinfra/test => test}/storage/client_mock.py (100%) rename {pyinfra/test => test}/unit_tests/__init__.py (100%) rename {pyinfra/test => test}/unit_tests/azure_adapter_test.py (74%) rename {pyinfra/test => test}/unit_tests/config_test.py (100%) rename {pyinfra/test => test}/unit_tests/conftest.py (95%) rename {pyinfra/test => test}/unit_tests/consumer_test.py (100%) rename {pyinfra/test => test}/unit_tests/queue_visitor_test.py (100%) rename {pyinfra/test => test}/unit_tests/storage_test.py (100%) diff --git a/pyinfra/locations.py b/pyinfra/locations.py index abd6a88..54c5a17 100644 --- a/pyinfra/locations.py +++ b/pyinfra/locations.py @@ -7,7 +7,7 @@ MODULE_DIR = Path(__file__).resolve().parents[0] PACKAGE_ROOT_DIR = MODULE_DIR.parents[0] -TEST_DIR = MODULE_DIR / "test" +TEST_DIR = PACKAGE_ROOT_DIR / "test" CONFIG_FILE = PACKAGE_ROOT_DIR / "config.yaml" diff --git a/pyinfra/test/__init__.py b/test/__init__.py similarity index 100% rename from pyinfra/test/__init__.py rename to test/__init__.py diff --git a/pyinfra/test/config.py b/test/config.py similarity index 100% rename from pyinfra/test/config.py rename to test/config.py diff --git a/pyinfra/test/config.yaml b/test/config.yaml similarity index 100% rename from pyinfra/test/config.yaml rename to test/config.yaml diff --git a/pyinfra/test/exploration_tests/__init__.py b/test/exploration_tests/__init__.py similarity index 100% rename from pyinfra/test/exploration_tests/__init__.py rename to test/exploration_tests/__init__.py diff --git a/pyinfra/test/exploration_tests/request_test.py b/test/exploration_tests/data_json_request_test.py similarity index 100% rename from pyinfra/test/exploration_tests/request_test.py rename to test/exploration_tests/data_json_request_test.py diff --git a/pyinfra/test/queue/__init__.py b/test/queue/__init__.py similarity index 100% rename from pyinfra/test/queue/__init__.py rename to test/queue/__init__.py diff --git a/pyinfra/test/queue/queue_manager_mock.py b/test/queue/queue_manager_mock.py similarity index 96% rename from pyinfra/test/queue/queue_manager_mock.py rename to test/queue/queue_manager_mock.py index 58c40a3..063a68b 100644 --- a/pyinfra/test/queue/queue_manager_mock.py +++ b/test/queue/queue_manager_mock.py @@ -1,5 +1,5 @@ from pyinfra.queue.queue_manager.queue_manager import QueueManager, QueueHandle -from pyinfra.test.queue.queue_mock import QueueMock +from test.queue.queue_mock import QueueMock def monkey_patch_queue_handle(queue) -> QueueHandle: diff --git a/pyinfra/test/queue/queue_mock.py b/test/queue/queue_mock.py similarity index 100% rename from pyinfra/test/queue/queue_mock.py rename to test/queue/queue_mock.py diff --git a/pyinfra/test/storage/__init__.py b/test/storage/__init__.py similarity index 100% rename from pyinfra/test/storage/__init__.py rename to test/storage/__init__.py diff --git a/pyinfra/test/storage/adapter_mock.py b/test/storage/adapter_mock.py similarity index 94% rename from pyinfra/test/storage/adapter_mock.py rename to test/storage/adapter_mock.py index 98f3d81..5443ade 100644 --- a/pyinfra/test/storage/adapter_mock.py +++ b/test/storage/adapter_mock.py @@ -1,5 +1,5 @@ from pyinfra.storage.adapters.adapter import StorageAdapter -from pyinfra.test.storage.client_mock import StorageClientMock +from test.storage.client_mock import StorageClientMock class StorageAdapterMock(StorageAdapter): diff --git a/pyinfra/test/storage/client_mock.py b/test/storage/client_mock.py similarity index 100% rename from pyinfra/test/storage/client_mock.py rename to test/storage/client_mock.py diff --git a/pyinfra/test/unit_tests/__init__.py b/test/unit_tests/__init__.py similarity index 100% rename from pyinfra/test/unit_tests/__init__.py rename to test/unit_tests/__init__.py diff --git a/pyinfra/test/unit_tests/azure_adapter_test.py b/test/unit_tests/azure_adapter_test.py similarity index 74% rename from pyinfra/test/unit_tests/azure_adapter_test.py rename to test/unit_tests/azure_adapter_test.py index d758668..6807ffb 100644 --- a/pyinfra/test/unit_tests/azure_adapter_test.py +++ b/test/unit_tests/azure_adapter_test.py @@ -1,7 +1,7 @@ import pytest from pyinfra.storage.adapters.azure import AzureStorageAdapter -from pyinfra.test.storage.client_mock import StorageClientMock +from test.storage.client_mock import StorageClientMock @pytest.fixture diff --git a/pyinfra/test/unit_tests/config_test.py b/test/unit_tests/config_test.py similarity index 100% rename from pyinfra/test/unit_tests/config_test.py rename to test/unit_tests/config_test.py diff --git a/pyinfra/test/unit_tests/conftest.py b/test/unit_tests/conftest.py similarity index 95% rename from pyinfra/test/unit_tests/conftest.py rename to test/unit_tests/conftest.py index 7f9be90..92d78cf 100644 --- a/pyinfra/test/unit_tests/conftest.py +++ b/test/unit_tests/conftest.py @@ -16,10 +16,10 @@ from pyinfra.storage.adapters.s3 import S3StorageAdapter from pyinfra.storage.clients.azure import get_azure_client from pyinfra.storage.clients.s3 import get_s3_client from pyinfra.storage.storage import Storage -from pyinfra.test.config import CONFIG -from pyinfra.test.queue.queue_manager_mock import QueueManagerMock -from pyinfra.test.storage.adapter_mock import StorageAdapterMock -from pyinfra.test.storage.client_mock import StorageClientMock +from test.config import CONFIG +from test.queue.queue_manager_mock import QueueManagerMock +from test.storage.adapter_mock import StorageAdapterMock +from test.storage.client_mock import StorageClientMock from pyinfra.visitor import StorageStrategy, ForwardingStrategy, QueueVisitor logger = logging.getLogger(__name__) diff --git a/pyinfra/test/unit_tests/consumer_test.py b/test/unit_tests/consumer_test.py similarity index 100% rename from pyinfra/test/unit_tests/consumer_test.py rename to test/unit_tests/consumer_test.py diff --git a/pyinfra/test/unit_tests/queue_visitor_test.py b/test/unit_tests/queue_visitor_test.py similarity index 100% rename from pyinfra/test/unit_tests/queue_visitor_test.py rename to test/unit_tests/queue_visitor_test.py diff --git a/pyinfra/test/unit_tests/storage_test.py b/test/unit_tests/storage_test.py similarity index 100% rename from pyinfra/test/unit_tests/storage_test.py rename to test/unit_tests/storage_test.py