CI / backend-tests (push) Failing after 35s
1. passlib 1.7.4 liest bcrypt.__about__.__version__, das bcrypt>=4.1 entfernt hat - führte zu irreführendem "password cannot be longer than 72 bytes". Fix: bcrypt<4.1 pinnen. 2. Globaler async engine in conftest.py + pytest-asyncios default function-scoped Event-Loop führte zu "Task ... attached to a different loop" bei asyncpg. Fix: session-weiter Loop-Scope für Fixtures und Tests. Erster echter CI-Lauf (Host-Runner ohne Docker) kam bis zum pytest-Schritt durch, beide Fehler dort aufgedeckt. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L85hmKbvX7Cqkq47KnQhFt
11 lines
539 B
INI
11 lines
539 B
INI
[pytest]
|
|
asyncio_mode = auto
|
|
# Fund im ersten echten CI-Lauf: der globale engine in conftest.py wird einmal beim Import
|
|
# erzeugt, asyncpg-Verbindungen sind an die Event-Loop gebunden, in der sie entstanden sind.
|
|
# Ohne session-weiten Loop-Scope erzeugt pytest-asyncio pro Test eine neue Loop ->
|
|
# "RuntimeError: Task ... got Future ... attached to a different loop".
|
|
asyncio_default_fixture_loop_scope = session
|
|
asyncio_default_test_loop_scope = session
|
|
addopts = --cov=app --cov-report=term-missing --cov-fail-under=50
|
|
testpaths = tests
|