Skip to content

Commit 71a496c

Browse files
committed
Set venv to the one we're using for pymapdl
1 parent 7aff019 commit 71a496c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_inprocess.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@ def __init__(self, wdir: str, version: float, exec_path: str | None = None) -> N
4141
self._exec_path: str | None = exec_path
4242
self._output: str | None = None
4343

44+
# Detecting the venv
45+
if sys.prefix == sys.base_prefix:
46+
pytest.warns(
47+
"Running from global python interpreter is not recommended."
48+
)
49+
os.environ["MAPDL_PYTHON_ENV"] = sys.prefix
50+
4451
@property
4552
def exec_path(self) -> str:
4653
if self._exec_path is None:

0 commit comments

Comments
 (0)