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

Allowing latest as version #2515

Merged
merged 7 commits into from
Nov 21, 2023
Merged
Show file tree
Hide file tree
Changes from 6 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
5 changes: 4 additions & 1 deletion src/ansys/mapdl/core/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -1882,7 +1882,10 @@ def _verify_version(version):
version = int(version * 10)

if isinstance(version, str):
if version.upper().strip() in [
if version.lower().strip() == "latest":
return None # Default behaviour is latest

elif version.upper().strip() in [
str(each) for each in SUPPORTED_ANSYS_VERSIONS.keys()
]:
version = int(version)
Expand Down
4 changes: 4 additions & 0 deletions tests/test_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,10 @@ def test__verify_version_pass(version):
assert min(versions.keys()) <= ver <= max(versions.keys())


def test__verify_version_latest():
assert _verify_version("latest") is None


@requires("ansys-tools-path")
@requires("local")
def test_find_ansys(mapdl):
Expand Down
Loading