refactor(tests): reorganize tests per module with shared root conftest

Move 42 single-module test files into app/modules/*/tests/ directories
while keeping 40 cross-module and infrastructure tests central in tests/.
Hub fixtures (engine, db, client, cleanup) moved to root conftest.py so
both tests/ and module tests inherit them. Update pyproject.toml testpaths
and Makefile TEST_PATHS to discover all test locations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-10 21:42:06 +01:00
parent 1da03e41f9
commit ecb5309879
34 changed files with 228 additions and 183 deletions

View File

@@ -250,8 +250,8 @@ ifdef frontend
endif
endif
# All testpaths
TEST_PATHS := tests/
# All testpaths (central + module tests)
TEST_PATHS := tests/ app/modules/tenancy/tests/ app/modules/catalog/tests/ app/modules/billing/tests/ app/modules/messaging/tests/ app/modules/orders/tests/ app/modules/customers/tests/ app/modules/marketplace/tests/ app/modules/inventory/tests/ app/modules/loyalty/tests/
test:
@docker compose -f docker-compose.test.yml up -d 2>/dev/null || true