diff --git a/spin/tests/test_build_cmds.py b/spin/tests/test_build_cmds.py index 5aa6518..56bfa2d 100644 --- a/spin/tests/test_build_cmds.py +++ b/spin/tests/test_build_cmds.py @@ -5,7 +5,7 @@ from pathlib import Path import pytest -from testutil import skip_on_windows, skip_unless_linux, spin, stdout +from testutil import skip_on_windows, skip_unless_linux, skip_unless_macos, spin, stdout from spin.cmds.util import run @@ -143,3 +143,17 @@ def test_gdb(): "--batch", ) assert "hi" in stdout(p) + + +@skip_unless_macos +def test_lldb(): + p = spin( + "lldb", + "-c", + 'import example_pkg; example_pkg.echo("hi")', + "--", + "-o", + "run", + "--batch", + ) + assert "hi" in stdout(p) diff --git a/spin/tests/testutil.py b/spin/tests/testutil.py index 5595e2d..99333dd 100644 --- a/spin/tests/testutil.py +++ b/spin/tests/testutil.py @@ -13,6 +13,10 @@ not sys.platform.startswith("linux"), reason="Skipped; platform not Linux" ) +skip_unless_macos = pytest.mark.skipif( + not sys.platform.startswith("darwin"), reason="Skipped; platform not macOS" +) + def spin(*args, **user_kwargs): args = (str(el) for el in args)