Skip to content

Commit

Permalink
tests: not requiring warning if on minimal since ATP is not present.
Browse files Browse the repository at this point in the history
  • Loading branch information
germa89 committed Oct 25, 2024
1 parent 00b1faa commit 64f6e98
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -774,6 +774,8 @@ jobs:
env:
ON_LOCAL: true
ON_UBUNTU: true
TESTING_MINIMAL: true


steps:
- name: "Install Git and checkout project"
Expand Down
12 changes: 9 additions & 3 deletions tests/test_launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
ON_LOCAL,
PATCH_MAPDL_START,
QUICK_LAUNCH_SWITCHES,
TESTING_MINIMAL,
NullContext,
requires,
)
Expand Down Expand Up @@ -1390,9 +1391,14 @@ def test_launch_on_hpc_not_found_ansys(mck_sc, mck_lgrpc, mck_kj, monkeypatch):
"a long scontrol...\nJobState=RUNNING\n...\nBatchHost=myhostname\n...\nin message"
)

with pytest.warns(
UserWarning, match="PyMAPDL could not find the ANSYS executable."
):
if TESTING_MINIMAL:
context = NullContext()
else:
context = pytest.warns(
UserWarning, match="PyMAPDL could not find the ANSYS executable."
)

with context:
mapdl = launch_mapdl(
launch_on_hpc=True,
exec_file=exec_file,
Expand Down

0 comments on commit 64f6e98

Please sign in to comment.