Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Derive Desktop version for IronPython Unit tests if being run from within desktop #618

Merged
merged 1 commit into from
Dec 3, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions _unittest/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import json
import gc
import sys
from pyaedt.generic.general_methods import is_ironpython
from pyaedt.generic.general_methods import is_ironpython, inside_desktop

if is_ironpython:
import _unittest_ironpython.conf_unittest as pytest
Expand Down Expand Up @@ -57,7 +57,10 @@
with open(local_config_file) as f:
config = json.load(f)
else:
config = {"desktopVersion": "2021.2", "NonGraphical": False, "NewThread": True, "test_desktops": False,
default_version = "2021.2"
if inside_desktop and "oDesktop" in dir(sys.modules['__main__']):
default_version = sys.modules['__main__'].oDesktop.GetVersion()[0:6]
config = {"desktopVersion": default_version, "NonGraphical": False, "NewThread": True, "test_desktops": False,
"build_machine": True, "skip_space_claim": False, "skip_circuits": False, "skip_edb": False,
"skip_debug": False, "local": False}

Expand Down