Skip to content

Commit

Permalink
fix: skip tests if not on remote
Browse files Browse the repository at this point in the history
  • Loading branch information
germa89 committed Jul 31, 2024
1 parent 9c41f1c commit 6f566d7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 8 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@
reason="Skipping because not on local. ",
)

skip_if_not_remote = pytest.mark.skipif(
ON_LOCAL,
reason="Skipping because not on remote. ",
)

skip_if_on_cicd = pytest.mark.skipif(
ON_CI,
reason="""Skip if on CI/CD.""",
Expand Down Expand Up @@ -146,6 +151,9 @@ def requires(requirement: str):
elif "local" == requirement:
return skip_if_not_local

elif "remote" == requirement:
return skip_if_not_remote

elif "cicd" == requirement:
return skip_if_on_cicd

Expand Down
4 changes: 3 additions & 1 deletion tests/test_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,9 @@ def test__check_stds(mapdl):
assert mapdl._stderr is not None


def test_exception_message_length(monkeypatch, mapdl):
@requires("remote")
def test_exception_message_length(mapdl):
# This test does not fail if running on local
channel = grpc.insecure_channel(
mapdl._channel_str,
options=[
Expand Down

0 comments on commit 6f566d7

Please sign in to comment.