Skip to content

Commit

Permalink
Remove sys.exit call in inspect_objects() and add test
Browse files Browse the repository at this point in the history
  • Loading branch information
beeankha committed Apr 3, 2024
1 parent 59e67e6 commit 89eae7d
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tests/test_inspect_pkg.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
from conda.core.prefix_data import PrefixData

from conda_build.exceptions import CondaBuildUserError
from conda_build.inspect_pkg import inspect_linkages, which_package
from conda_build.utils import on_win
from conda_build.inspect_pkg import inspect_linkages, inspect_objects, which_package
from conda_build.utils import on_mac, on_win


def test_which_package(tmp_path: Path):
Expand Down Expand Up @@ -289,3 +289,9 @@ def test_inspect_linkages_on_win():
def test_inspect_linkages_not_installed():
with pytest.raises(CondaBuildUserError):
inspect_linkages(["not_installed_pkg"])


@pytest.mark.skipif(on_mac, reason="inspect_objects is only available on macOS")
def test_inspect_objects_not_on_mac():
with pytest.raises(CondaBuildUserError):
inspect_objects([])

0 comments on commit 89eae7d

Please sign in to comment.