Skip to content

Commit

Permalink
reverting to main
Browse files Browse the repository at this point in the history
  • Loading branch information
germa89 committed Nov 21, 2023
1 parent 1e49fbd commit 70c0ed3
Showing 1 changed file with 54 additions and 64 deletions.
118 changes: 54 additions & 64 deletions tests/test_importing_geometries.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import os

# import pytest
import pytest

# from ansys.mapdl.core.errors import (
# MapdlCommandIgnoredError,
# MapdlInvalidRoutineError,
# MapdlRuntimeError,
# )
# from conftest import ON_CI, ON_LOCAL, ON_UBUNTU
from ansys.mapdl.core.errors import (
MapdlCommandIgnoredError,
MapdlInvalidRoutineError,
MapdlRuntimeError,
)
from conftest import ON_CI, ON_LOCAL, ON_UBUNTU

PATH = os.path.dirname(os.path.abspath(__file__))

Expand Down Expand Up @@ -85,29 +85,27 @@ def test_readin_igs(mapdl, cleared):

## Connection commands
#
# @pytest.mark.xfail(True, reason="Command seems broken. See #2377")
@pytest.mark.xfail(True, reason="Command seems broken. See #2377")
def test_readin_sat(mapdl, cleared):
# if ON_CI and mapdl.version >= 23.2:
# context = pytest.raises(
# MapdlRuntimeError, match="Specified library does not exist."
# )

# elif ON_CI and mapdl.version <= 22.2 and not ON_UBUNTU:
# context = pytest.raises(
# MapdlRuntimeError, match="No shared command/library files were found"
# )

# elif ON_CI and mapdl.version == 22.2 and ON_UBUNTU and not ON_LOCAL:
# context = pytest.raises(MapdlCommandIgnoredError, match="anf does not exist.")
if ON_CI and mapdl.version >= 23.2:
context = pytest.raises(
MapdlRuntimeError, match="Specified library does not exist."
)

# elif ON_CI and ON_LOCAL:
# context = pytest.raises(MapdlCommandIgnoredError, match="anf does not exist.")
elif ON_CI and mapdl.version <= 22.2 and not ON_UBUNTU:
context = pytest.raises(
MapdlRuntimeError, match="No shared command/library files were found"
)

# elif ON_CI:
# context = pytest.raises(AssertionError)
elif ON_CI and mapdl.version == 22.2 and ON_UBUNTU and not ON_LOCAL:
context = pytest.raises(MapdlCommandIgnoredError, match="anf does not exist.")

# else:
context = NullContext()
elif ON_CI and ON_LOCAL:
context = pytest.raises(MapdlCommandIgnoredError, match="anf does not exist.")
elif ON_CI:
context = pytest.raises(AssertionError)
else:
context = NullContext()

with context:
mapdl.satin(
Expand All @@ -117,37 +115,29 @@ def test_readin_sat(mapdl, cleared):
clear_wkdir_from_cads(mapdl)


# @pytest.mark.xfail(True, reason="Command seems broken. See #2377")
@pytest.mark.xfail(True, reason="Command seems broken. See #2377")
def test_readin_x_t(mapdl, cleared):
# if ON_CI and mapdl.version >= 23.2:
# context = pytest.raises(
# MapdlRuntimeError, match="Specified library does not exist."
# )

# elif ON_CI and mapdl.version == 23.1:
# """
# Running "/ansys_inc/ansys/ac4/bin/para/linx64/ac4para CubeWithHole.x_t test_para.anf ALL ANF" shows the following errors:
if ON_CI and mapdl.version >= 23.2:
context = pytest.raises(
MapdlRuntimeError, match="Specified library does not exist."
)

# /ansys_inc/ansys/ac4/bin/para/linx64/ac4para: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /ansys_inc/ansys/ac4/bin/para/linx64/ac4para)
# /ansys_inc/ansys/ac4/bin/para/linx64/ac4para: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by /ansys_inc/ansys/ac4/bin/para/linx64/ac4para)
# /ansys_inc/ansys/ac4/bin/para/linx64/ac4para: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.22' not found (required by /ansys_inc/ansys/ac4/bin/para/linx64/ac4para)
# /ansys_inc/ansys/ac4/bin/para/linx64/ac4para: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /ansys_inc/ansys/ac4/bin/para/linx64/ac4para)
elif ON_CI and mapdl.version == 23.1:
context = pytest.raises(MapdlCommandIgnoredError, match="does not exist")

# So it seems the library `libstdc++.so` (which I believe it is the standard c++ library) is missing some versions or dependencies.
# """
# context = pytest.raises(MapdlCommandIgnoredError, match=".anf does not exist.")
elif ON_CI and mapdl.version <= 22.2 and not ON_UBUNTU:
context = pytest.raises(
MapdlRuntimeError, match="No shared command/library files were found"
)

# elif ON_CI and mapdl.version <= 22.2 and not ON_UBUNTU:
# context = pytest.raises(
# MapdlRuntimeError, match="No shared command/library files were found"
# )
elif ON_CI and ON_LOCAL:
context = pytest.raises(AssertionError)

# elif ON_CI and ON_LOCAL:
# # it fails with message: "Can not access the schema directory."
# pytest.xfail()
elif ON_CI:
context = pytest.raises(MapdlCommandIgnoredError, match="anf does not exist.")

# else:
context = NullContext()
else:
context = NullContext()

with context:
mapdl.parain(
Expand All @@ -158,20 +148,20 @@ def test_readin_x_t(mapdl, cleared):
clear_wkdir_from_cads(mapdl)


# @pytest.mark.xfail(True, reason="Command seems broken. See #2377")
@pytest.mark.xfail(True, reason="Command seems broken. See #2377")
def test_readin_catiav5(mapdl, cleared):
# if ON_CI and mapdl.version <= 22.2 and not ON_UBUNTU:
# context = pytest.raises(
# MapdlRuntimeError, match="No shared command/library files were found"
# )

# elif ON_CI:
# context = pytest.raises(
# MapdlInvalidRoutineError, match=" ~CAT5IN is not a recognized"
# )

# else:
context = NullContext()
if ON_CI and mapdl.version <= 22.2 and not ON_UBUNTU:
context = pytest.raises(
MapdlRuntimeError, match="No shared command/library files were found"
)

elif ON_CI:
context = pytest.raises(
MapdlInvalidRoutineError, match=" ~CAT5IN is not a recognized"
)

else:
context = NullContext()

with context:
mapdl.cat5in(
Expand Down

0 comments on commit 70c0ed3

Please sign in to comment.