From 9645fccfb95529af160d4690b31b2632fe22389e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20K=C3=A4chele?= Date: Mon, 21 Apr 2025 11:46:02 +0200 Subject: [PATCH] Fix conftest setup --- tests/conftest.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 2fa9cfb..2bd96c5 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,3 +1,14 @@ +import os +import sys + +# NOTE: Not sure if that was really necessary or whether this +# is just my quirky venv setup +CURRENT_DIR = os.path.dirname(os.path.abspath(__file__)) +PROJECT_ROOT = os.path.abspath(os.path.join(CURRENT_DIR, '..')) + +if PROJECT_ROOT not in sys.path: + sys.path.insert(0, PROJECT_ROOT) + import pytest as pytest from starlette.testclient import TestClient