From e2d49557546cd92b77f4811607ccbdb39864f372 Mon Sep 17 00:00:00 2001 From: Mario Ostieri <107915956+mariostieriansys@users.noreply.github.com> Date: Thu, 17 Oct 2024 12:49:02 +0200 Subject: [PATCH] make default value of install path None and add EnSight install case in libuserd search for install (#461) --- src/ansys/pyensight/core/libuserd.py | 7 +++++++ tests/conftest.py | 6 +----- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/ansys/pyensight/core/libuserd.py b/src/ansys/pyensight/core/libuserd.py index 9f0046a21df..92311bfaf32 100644 --- a/src/ansys/pyensight/core/libuserd.py +++ b/src/ansys/pyensight/core/libuserd.py @@ -1330,6 +1330,13 @@ def _find_ensight_server_name(ansys_installation: str = "") -> Optional[str]: # ways, we'll add that one too, just in case. dirs_to_check.append(os.path.join(env_inst, "CEI")) + try: + import enve + + dirs_to_check.append(enve.home()) + except ModuleNotFoundError: + pass + if "CEI_HOME" in os.environ: env_inst = os.environ["CEI_HOME"] dirs_to_check.append(env_inst) diff --git a/tests/conftest.py b/tests/conftest.py index ab152c492e6..7c3fc212771 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -21,11 +21,7 @@ def pytest_addoption(parser: pytest.Parser) -> None: $ pytest tests --install-path "/ansys_inc/v231/CEI/bin/ensight" TODO: Default must be set to the one on the CI/CD server. """ - parser.addoption( - "--install-path", - action="store", - default=f"/ansys_inc/v{ansys.pyensight.core.__ansys_version__}/", - ) + parser.addoption("--install-path", action="store") parser.addoption("--use-local-launcher", default=False, action="store_true")