From 3c2ef25edd6124841cd1259e4be09341dbd520c0 Mon Sep 17 00:00:00 2001 From: stumpylog <797416+stumpylog@users.noreply.github.com> Date: Fri, 5 Jun 2026 11:56:49 -0700 Subject: [PATCH] Fixes this test so it works regardless of cwd --- src/paperless_ai/tests/test_lazy_imports.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/paperless_ai/tests/test_lazy_imports.py b/src/paperless_ai/tests/test_lazy_imports.py index 12089308a..7418d2ef0 100644 --- a/src/paperless_ai/tests/test_lazy_imports.py +++ b/src/paperless_ai/tests/test_lazy_imports.py @@ -1,5 +1,8 @@ import subprocess import sys +from pathlib import Path + +_SRC_DIR = Path(__file__).parent.parent.parent class TestLazyAiImports: @@ -17,6 +20,6 @@ class TestLazyAiImports: [sys.executable, "-c", code], capture_output=True, text=True, - cwd="src", + cwd=_SRC_DIR, ) assert result.returncode == 0, result.stdout + result.stderr