summaryrefslogtreecommitdiff
path: root/psutil
diff options
context:
space:
mode:
authorMatthieu Darbois <mayeut@users.noreply.github.com>2023-03-18 13:29:15 +0100
committerGitHub <noreply@github.com>2023-03-18 13:29:15 +0100
commitdc4f7f50e859144c1092a6c225949c536072ea64 (patch)
tree56353e8be46193f84f1c13c081e8f51108aafe08 /psutil
parent1aa9bc838a7dbc96c40d9ffef712308205caa7e8 (diff)
downloadpsutil-dc4f7f50e859144c1092a6c225949c536072ea64.tar.gz
CI: fix TestScripts tests failing due to ambiguous SCRIPTS_DIR (#2211)
Tests are being run with psutil installed in a virtual environment within cibuildwheel builds. The scripts folder is not being found in this installation & thus, those tests are skipped. This commit allows to pass the path of the scripts folder through an environment variable & re-enables those tests. Signed-off-by: mayeut <mayeut@users.noreply.github.com>
Diffstat (limited to 'psutil')
-rw-r--r--psutil/tests/__init__.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/psutil/tests/__init__.py b/psutil/tests/__init__.py
index f66ff813..61a06e21 100644
--- a/psutil/tests/__init__.py
+++ b/psutil/tests/__init__.py
@@ -198,7 +198,10 @@ ASCII_FS = sys.getfilesystemencoding().lower() in ('ascii', 'us-ascii')
ROOT_DIR = os.path.realpath(
os.path.join(os.path.dirname(__file__), '..', '..'))
-SCRIPTS_DIR = os.path.join(ROOT_DIR, 'scripts')
+SCRIPTS_DIR = os.environ.get(
+ "PSUTIL_SCRIPTS_DIR",
+ os.path.join(ROOT_DIR, 'scripts')
+)
HERE = os.path.realpath(os.path.dirname(__file__))
# --- support