From e235e998e4552a51e53dd991bcd19b6d5cfd4585 Mon Sep 17 00:00:00 2001 From: Bill Date: Tue, 30 Dec 2025 17:38:46 -0500 Subject: [PATCH] refactor: organize tests into unit/ and integration/ directories Move unit tests from tests/ to tests/unit/ for clearer separation from integration tests. Update pyproject.toml testpaths and Makefile test target to reflect the new structure. --- Makefile | 2 +- pyproject.toml | 2 +- tests/unit/__init__.py | 0 tests/{ => unit}/test_auth.py | 0 tests/{ => unit}/test_config.py | 0 tests/{ => unit}/test_grist_client.py | 0 tests/{ => unit}/test_server.py | 0 tests/{ => unit}/test_tools_discovery.py | 0 tests/{ => unit}/test_tools_read.py | 0 tests/{ => unit}/test_tools_schema.py | 0 tests/{ => unit}/test_tools_write.py | 0 11 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 tests/unit/__init__.py rename tests/{ => unit}/test_auth.py (100%) rename tests/{ => unit}/test_config.py (100%) rename tests/{ => unit}/test_grist_client.py (100%) rename tests/{ => unit}/test_server.py (100%) rename tests/{ => unit}/test_tools_discovery.py (100%) rename tests/{ => unit}/test_tools_read.py (100%) rename tests/{ => unit}/test_tools_schema.py (100%) rename tests/{ => unit}/test_tools_write.py (100%) diff --git a/Makefile b/Makefile index 032cd7b..2c9e0f5 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,7 @@ help: ## Show this help @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' test: ## Run unit tests - uv run pytest tests/ -v --ignore=tests/integration + uv run pytest tests/unit/ -v build: ## Build Docker images for testing docker compose -f docker-compose.test.yaml build diff --git a/pyproject.toml b/pyproject.toml index 40df815..cafd3a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,4 +25,4 @@ build-backend = "hatchling.build" [tool.pytest.ini_options] asyncio_mode = "auto" -testpaths = ["tests"] +testpaths = ["tests/unit", "tests/integration"] diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/tests/test_auth.py b/tests/unit/test_auth.py similarity index 100% rename from tests/test_auth.py rename to tests/unit/test_auth.py diff --git a/tests/test_config.py b/tests/unit/test_config.py similarity index 100% rename from tests/test_config.py rename to tests/unit/test_config.py diff --git a/tests/test_grist_client.py b/tests/unit/test_grist_client.py similarity index 100% rename from tests/test_grist_client.py rename to tests/unit/test_grist_client.py diff --git a/tests/test_server.py b/tests/unit/test_server.py similarity index 100% rename from tests/test_server.py rename to tests/unit/test_server.py diff --git a/tests/test_tools_discovery.py b/tests/unit/test_tools_discovery.py similarity index 100% rename from tests/test_tools_discovery.py rename to tests/unit/test_tools_discovery.py diff --git a/tests/test_tools_read.py b/tests/unit/test_tools_read.py similarity index 100% rename from tests/test_tools_read.py rename to tests/unit/test_tools_read.py diff --git a/tests/test_tools_schema.py b/tests/unit/test_tools_schema.py similarity index 100% rename from tests/test_tools_schema.py rename to tests/unit/test_tools_schema.py diff --git a/tests/test_tools_write.py b/tests/unit/test_tools_write.py similarity index 100% rename from tests/test_tools_write.py rename to tests/unit/test_tools_write.py