From fc8ad5598fe2b08590e40d311f96288c9ec82c3e Mon Sep 17 00:00:00 2001
From: ptresson <paul.tresson@ird.fr>
Date: Fri, 4 Oct 2024 11:32:13 +0200
Subject: [PATCH] append locally installed packages to PYTHON_PATH for tests

---
 tests/__init__.py | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tests/__init__.py b/tests/__init__.py
index e69de29..c3de68e 100644
--- a/tests/__init__.py
+++ b/tests/__init__.py
@@ -0,0 +1,9 @@
+import sys
+import os
+
+PYTHON_VERSION = sys.version_info
+SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
+PLUGIN_ROOT_DIR = os.path.realpath(os.path.abspath(os.path.join(SCRIPT_DIR, '..')))
+PACKAGES_INSTALL_DIR = os.path.join(PLUGIN_ROOT_DIR, f'python{PYTHON_VERSION.major}.{PYTHON_VERSION.minor}')
+
+sys.path.append(PACKAGES_INSTALL_DIR)  # TODO: check for a less intrusive way to do this
-- 
GitLab