Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/pip/grpc-deps-41033be97a
Browse files Browse the repository at this point in the history
  • Loading branch information
germa89 authored Sep 3, 2024
2 parents da6a2fd + e25dddf commit 6ea5e6c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 16 deletions.
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

0 comments on commit 6ea5e6c

Please sign in to comment.