Stabilize test imports with explicit project root path
All checks were successful
docker / test (push) Successful in 10s
docker / build-and-push (push) Successful in 51s

This commit is contained in:
Space-Banane
2026-05-20 22:08:02 +02:00
parent 156485c67b
commit 17b4793a73

View File

@@ -1,12 +1,18 @@
import importlib
import os
import sys
import time
from pathlib import Path
from typing import Iterator
import pymysql
import pytest
from fastapi.testclient import TestClient
PROJECT_ROOT = Path(__file__).resolve().parents[1]
if str(PROJECT_ROOT) not in sys.path:
sys.path.insert(0, str(PROJECT_ROOT))
def wait_for_db(host: str, port: int, user: str, password: str, timeout_seconds: int = 60) -> None:
deadline = time.time() + timeout_seconds