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

chore: skip database testing on v23.X #3384

Merged
merged 4 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions doc/changelog.d/3384.added.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
chore: skip database testing on v23.X
19 changes: 3 additions & 16 deletions tests/test_database.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

## Checking MAPDL versions
from ansys.mapdl.core.database import MINIMUM_MAPDL_VERSION, DBDef, MapdlDb
from ansys.mapdl.core.database.database import FAILING_DATABASE_MAPDL
from ansys.mapdl.core.errors import MapdlRuntimeError, MapdlVersionError
from ansys.mapdl.core.misc import random_string
from conftest import ON_CI
Expand All @@ -43,25 +42,18 @@ def db(mapdl):
pytest.skip("Requires 'ansys.api.mapdl' package to at least v0.5.1.")

## Checking MAPDL versions

mapdl_version = str(mapdl.version)
if not server_meets_version(mapdl_version, MINIMUM_MAPDL_VERSION):
pytest.skip(
f"This MAPDL version ({mapdl_version}) is not compatible with the Database module."
)

## Exceptions
# Exception for 22.2
if mapdl_version == "22.2" and ON_CI:
if mapdl_version in ["22.2", "23.1", "23.2", "24.1", "24.2", "25.1"] and ON_CI:
pytest.skip(
f"This MAPDL version ({mapdl_version}) docker image seems to not support DB, but local does."
)

if mapdl_version in ["24.1", "24.2", "25.1"]:
pytest.skip(
f"This MAPDL version ({mapdl_version}) does not support PyMAPDL Database."
)

if mapdl._server_version < (0, 4, 1): # 2021R2
ver_ = ".".join([str(each) for each in mapdl._server_version])
pytest.skip(
Expand Down Expand Up @@ -112,17 +104,12 @@ def test_database_start_stop(mapdl):
f"This MAPDL version ({mapdl_version}) is not compatible with the Database module."
)

# Exception for 22.2
if mapdl_version == "22.2" and ON_CI:
# Exceptions
if mapdl_version in ["22.2", "23.1", "23.2", "24.1", "24.2", "25.1"] and ON_CI:
pytest.skip(
f"This MAPDL version ({mapdl_version}) docker image seems to not support DB, but local does."
)

if mapdl_version in FAILING_DATABASE_MAPDL:
pytest.skip(
f"This MAPDL version ({mapdl_version}) docker image does not support Database module."
)

# verify it can be created twice
mapdl.prep7()
for _ in range(2):
Expand Down
Loading