diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7243d9b..fa9a231 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,7 +34,7 @@ jobs: - '.github/workflows/ci.yml' python: - 'py_src/**' - - 'tests/python/**' + - 'tests/**' - 'pyproject.toml' - 'uv.lock' - 'crates/**' @@ -84,7 +84,7 @@ jobs: run: uv run ruff format --check py_src/ tests/ - name: Type-check Python with mypy - run: uv run mypy py_src/taskito/ tests/python/ --no-incremental + run: uv run mypy py_src/taskito/ tests/ --no-incremental rust-test: name: Rust Tests (SQLite) @@ -254,10 +254,10 @@ jobs: args: --release --features extension-module,postgres,redis,native-async,workflows - name: Run Python test suite - # The pytest_unconfigure hook in tests/python/conftest.py calls + # The pytest_unconfigure hook in tests/conftest.py calls # ``os._exit(0)`` on a clean run to bypass CPython finalization and # avoid the PyO3 daemon-thread SIGABRT we used to paper over here. - run: uv run python -m pytest tests/python/ -v --junitxml=test-results.xml + run: uv run python -m pytest tests/ -v --junitxml=test-results.xml ci-status: name: CI status diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a42b816..d9c404e 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -31,7 +31,7 @@ repos: - id: mypy name: mypy (py_src + tests) - entry: uv run mypy py_src/taskito/ tests/python/ --no-incremental + entry: uv run mypy py_src/taskito/ tests/ --no-incremental language: system types: [python] pass_filenames: false diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e23466e..dcf86f2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,7 +43,7 @@ Python-only changes don't require a rebuild. ### Python Tests ```bash -pytest tests/python/ +pytest tests/ ``` ### Rust Tests diff --git a/pyproject.toml b/pyproject.toml index 8307412..ed85b08 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -62,7 +62,7 @@ taskito = "taskito.cli:main" [tool.pytest.ini_options] asyncio_mode = "auto" -testpaths = ["tests/python"] +testpaths = ["tests"] # -- Ruff -- diff --git a/tests/python/conftest.py b/tests/conftest.py similarity index 100% rename from tests/python/conftest.py rename to tests/conftest.py diff --git a/tests/python/test_basic.py b/tests/core/test_basic.py similarity index 100% rename from tests/python/test_basic.py rename to tests/core/test_basic.py diff --git a/tests/python/test_batch.py b/tests/core/test_batch.py similarity index 100% rename from tests/python/test_batch.py rename to tests/core/test_batch.py diff --git a/tests/python/test_cancel.py b/tests/core/test_cancel.py similarity index 100% rename from tests/python/test_cancel.py rename to tests/core/test_cancel.py diff --git a/tests/python/test_chain.py b/tests/core/test_chain.py similarity index 100% rename from tests/python/test_chain.py rename to tests/core/test_chain.py diff --git a/tests/python/test_dependencies.py b/tests/core/test_dependencies.py similarity index 100% rename from tests/python/test_dependencies.py rename to tests/core/test_dependencies.py diff --git a/tests/python/test_dlq.py b/tests/core/test_dlq.py similarity index 100% rename from tests/python/test_dlq.py rename to tests/core/test_dlq.py diff --git a/tests/python/test_idempotent.py b/tests/core/test_idempotent.py similarity index 100% rename from tests/python/test_idempotent.py rename to tests/core/test_idempotent.py diff --git a/tests/python/test_namespace.py b/tests/core/test_namespace.py similarity index 100% rename from tests/python/test_namespace.py rename to tests/core/test_namespace.py diff --git a/tests/python/test_periodic.py b/tests/core/test_periodic.py similarity index 100% rename from tests/python/test_periodic.py rename to tests/core/test_periodic.py diff --git a/tests/python/test_priority.py b/tests/core/test_priority.py similarity index 100% rename from tests/python/test_priority.py rename to tests/core/test_priority.py diff --git a/tests/python/test_rate_limit.py b/tests/core/test_rate_limit.py similarity index 100% rename from tests/python/test_rate_limit.py rename to tests/core/test_rate_limit.py diff --git a/tests/python/test_result_race.py b/tests/core/test_result_race.py similarity index 100% rename from tests/python/test_result_race.py rename to tests/core/test_result_race.py diff --git a/tests/python/test_retry.py b/tests/core/test_retry.py similarity index 100% rename from tests/python/test_retry.py rename to tests/core/test_retry.py diff --git a/tests/python/test_retry_history.py b/tests/core/test_retry_history.py similarity index 100% rename from tests/python/test_retry_history.py rename to tests/core/test_retry_history.py diff --git a/tests/python/test_run_maybe_async.py b/tests/core/test_run_maybe_async.py similarity index 100% rename from tests/python/test_run_maybe_async.py rename to tests/core/test_run_maybe_async.py diff --git a/tests/python/test_serializers.py b/tests/core/test_serializers.py similarity index 100% rename from tests/python/test_serializers.py rename to tests/core/test_serializers.py diff --git a/tests/python/test_shutdown.py b/tests/core/test_shutdown.py similarity index 100% rename from tests/python/test_shutdown.py rename to tests/core/test_shutdown.py diff --git a/tests/python/test_unique.py b/tests/core/test_unique.py similarity index 100% rename from tests/python/test_unique.py rename to tests/core/test_unique.py diff --git a/tests/python/test_dashboard.py b/tests/dashboard/test_dashboard.py similarity index 100% rename from tests/python/test_dashboard.py rename to tests/dashboard/test_dashboard.py diff --git a/tests/python/test_dashboard_settings.py b/tests/dashboard/test_dashboard_settings.py similarity index 100% rename from tests/python/test_dashboard_settings.py rename to tests/dashboard/test_dashboard_settings.py diff --git a/tests/python/test_dashboard_static.py b/tests/dashboard/test_dashboard_static.py similarity index 100% rename from tests/python/test_dashboard_static.py rename to tests/dashboard/test_dashboard_static.py diff --git a/tests/python/test_cli.py b/tests/integrations/test_cli.py similarity index 100% rename from tests/python/test_cli.py rename to tests/integrations/test_cli.py diff --git a/tests/python/test_contrib.py b/tests/integrations/test_contrib.py similarity index 100% rename from tests/python/test_contrib.py rename to tests/integrations/test_contrib.py diff --git a/tests/python/test_fastapi.py b/tests/integrations/test_fastapi.py similarity index 100% rename from tests/python/test_fastapi.py rename to tests/integrations/test_fastapi.py diff --git a/tests/python/test_keda.py b/tests/integrations/test_keda.py similarity index 100% rename from tests/python/test_keda.py rename to tests/integrations/test_keda.py diff --git a/tests/python/test_context.py b/tests/observability/test_context.py similarity index 100% rename from tests/python/test_context.py rename to tests/observability/test_context.py diff --git a/tests/python/test_customizability.py b/tests/observability/test_customizability.py similarity index 100% rename from tests/python/test_customizability.py rename to tests/observability/test_customizability.py diff --git a/tests/python/test_events.py b/tests/observability/test_events.py similarity index 100% rename from tests/python/test_events.py rename to tests/observability/test_events.py diff --git a/tests/python/test_hooks.py b/tests/observability/test_hooks.py similarity index 100% rename from tests/python/test_hooks.py rename to tests/observability/test_hooks.py diff --git a/tests/python/test_observability.py b/tests/observability/test_observability.py similarity index 100% rename from tests/python/test_observability.py rename to tests/observability/test_observability.py diff --git a/tests/python/test_progress.py b/tests/observability/test_progress.py similarity index 100% rename from tests/python/test_progress.py rename to tests/observability/test_progress.py diff --git a/tests/python/test_webhooks.py b/tests/observability/test_webhooks.py similarity index 100% rename from tests/python/test_webhooks.py rename to tests/observability/test_webhooks.py diff --git a/tests/python/prefork_apps/__init__.py b/tests/python/prefork_apps/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/tests/python/test_interception.py b/tests/resources/test_interception.py similarity index 100% rename from tests/python/test_interception.py rename to tests/resources/test_interception.py diff --git a/tests/python/test_proxies.py b/tests/resources/test_proxies.py similarity index 100% rename from tests/python/test_proxies.py rename to tests/resources/test_proxies.py diff --git a/tests/python/test_resource_system_full.py b/tests/resources/test_resource_system_full.py similarity index 100% rename from tests/python/test_resource_system_full.py rename to tests/resources/test_resource_system_full.py diff --git a/tests/python/test_resources.py b/tests/resources/test_resources.py similarity index 100% rename from tests/python/test_resources.py rename to tests/resources/test_resources.py diff --git a/tests/python/test_streaming.py b/tests/resources/test_streaming.py similarity index 100% rename from tests/python/test_streaming.py rename to tests/resources/test_streaming.py diff --git a/tests/python/__init__.py b/tests/worker/prefork_apps/__init__.py similarity index 100% rename from tests/python/__init__.py rename to tests/worker/prefork_apps/__init__.py diff --git a/tests/python/prefork_apps/cancel_app.py b/tests/worker/prefork_apps/cancel_app.py similarity index 100% rename from tests/python/prefork_apps/cancel_app.py rename to tests/worker/prefork_apps/cancel_app.py diff --git a/tests/python/prefork_apps/timeout_app.py b/tests/worker/prefork_apps/timeout_app.py similarity index 100% rename from tests/python/prefork_apps/timeout_app.py rename to tests/worker/prefork_apps/timeout_app.py diff --git a/tests/python/test_native_async.py b/tests/worker/test_native_async.py similarity index 100% rename from tests/python/test_native_async.py rename to tests/worker/test_native_async.py diff --git a/tests/python/test_prefork.py b/tests/worker/test_prefork.py similarity index 100% rename from tests/python/test_prefork.py rename to tests/worker/test_prefork.py diff --git a/tests/python/test_worker.py b/tests/worker/test_worker.py similarity index 100% rename from tests/python/test_worker.py rename to tests/worker/test_worker.py diff --git a/tests/python/test_worker_resources.py b/tests/worker/test_worker_resources.py similarity index 100% rename from tests/python/test_worker_resources.py rename to tests/worker/test_worker_resources.py diff --git a/tests/python/test_workflows_analysis.py b/tests/workflows/test_workflows_analysis.py similarity index 100% rename from tests/python/test_workflows_analysis.py rename to tests/workflows/test_workflows_analysis.py diff --git a/tests/python/test_workflows_caching.py b/tests/workflows/test_workflows_caching.py similarity index 100% rename from tests/python/test_workflows_caching.py rename to tests/workflows/test_workflows_caching.py diff --git a/tests/python/test_workflows_conditions.py b/tests/workflows/test_workflows_conditions.py similarity index 100% rename from tests/python/test_workflows_conditions.py rename to tests/workflows/test_workflows_conditions.py diff --git a/tests/python/test_workflows_cron.py b/tests/workflows/test_workflows_cron.py similarity index 100% rename from tests/python/test_workflows_cron.py rename to tests/workflows/test_workflows_cron.py diff --git a/tests/python/test_workflows_fan_out.py b/tests/workflows/test_workflows_fan_out.py similarity index 100% rename from tests/python/test_workflows_fan_out.py rename to tests/workflows/test_workflows_fan_out.py diff --git a/tests/python/test_workflows_gates.py b/tests/workflows/test_workflows_gates.py similarity index 100% rename from tests/python/test_workflows_gates.py rename to tests/workflows/test_workflows_gates.py diff --git a/tests/python/test_workflows_linear.py b/tests/workflows/test_workflows_linear.py similarity index 100% rename from tests/python/test_workflows_linear.py rename to tests/workflows/test_workflows_linear.py diff --git a/tests/python/test_workflows_subworkflow.py b/tests/workflows/test_workflows_subworkflow.py similarity index 100% rename from tests/python/test_workflows_subworkflow.py rename to tests/workflows/test_workflows_subworkflow.py diff --git a/tests/python/test_workflows_visualization.py b/tests/workflows/test_workflows_visualization.py similarity index 100% rename from tests/python/test_workflows_visualization.py rename to tests/workflows/test_workflows_visualization.py