Skip to content

Commit

Permalink
Add auto-resolution for TEST_PYDEV_BASE_LOC in TestDependent and add …
Browse files Browse the repository at this point in the history
…a basis for mac os.
  • Loading branch information
fabioz committed Oct 7, 2024
1 parent d202739 commit 96432a0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,21 @@ public static boolean isUnix() {
}

if (TEST_PYDEV_BASE_LOC == null) {
System.err.println("TEST_PYDEV_BASE_LOC variable MUST be set in " + propertiesFile + " to run tests.");
File file = new File(TestDependent.class.getProtectionDomain().getCodeSource().getLocation().getPath());

// File is something as Pydev/plugins/org.python.pydev.core
// We want something as: Pydev/plugins/
file = file.getParentFile();
if (new File(file, "org.python.pydev.core").exists()) {
TEST_PYDEV_BASE_LOC = file.toString().replace("\\", "/");
if (!TEST_PYDEV_BASE_LOC.endsWith("/")) {
TEST_PYDEV_BASE_LOC += '/';
}
} else {
System.err.println(
"TEST_PYDEV_BASE_LOC variable MUST be set in " + propertiesFile + " to run tests.");
}

} else if (!new File(TEST_PYDEV_BASE_LOC).exists()) {
System.err.println("TEST_PYDEV_BASE_LOC variable points to path that does NOT exist: "
+ TEST_PYDEV_BASE_LOC);
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

PYTHON_INSTALL = /Users/fabioz/Desktop/conda/miniconda3/envs/py311/
PYTHON_EXE = /Users/fabioz/Desktop/conda/miniconda3/envs/py311/bin/python

0 comments on commit 96432a0

Please sign in to comment.