Kaynağa Gözat

test: register sqlite_only and docker marks in pytest.ini, drop redundant asyncio marks

The suite reads backend/tests/pytest.ini, not pyproject.toml, so every
sqlite_only use warned "Unknown pytest.mark". Two modules marked their sync
tests asyncio; asyncio_mode is auto, so the mark was redundant.
maziggy 5 gün önce
ebeveyn
işleme
3542005110

+ 1 - 1
backend/tests/integration/test_admin_only_auth_config.py

@@ -12,7 +12,7 @@ everything else.
 import pytest
 from httpx import AsyncClient
 
-pytestmark = [pytest.mark.integration, pytest.mark.asyncio]
+pytestmark = pytest.mark.integration
 
 # pragma: allowlist secret — test fixtures only, not real credentials
 ADMIN_PW = "AdminConf1!"  # noqa: S105

+ 2 - 0
backend/tests/pytest.ini

@@ -18,3 +18,5 @@ markers =
     unit: Unit tests (fast, no external deps)
     integration: Integration tests (slower, test full API)
     slow: Slow tests (skip with -m "not slow")
+    docker: marks tests that run in Docker integration environment
+    sqlite_only: tests of SQLite-specific behaviour, skipped when the suite runs on PostgreSQL

+ 0 - 2
backend/tests/unit/test_previous_success_per_printer.py

@@ -18,8 +18,6 @@ from backend.app.models.printer import Printer
 from backend.app.services.print_scheduler import MODEL_GATE_WAIT_REASON, PrintScheduler
 from backend.tests.unit.test_scheduler_busy_reasons_3018 import _scheduler
 
-pytestmark = pytest.mark.asyncio
-
 
 @pytest.fixture
 async def farm(tmp_path):