diff --git a/tests/test_api.py b/tests/test_api.py index 8913eedc..310549f5 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -1,5 +1,6 @@ """Tests for alternative identifiers.""" +import importlib.util import unittest from contextlib import ExitStack from unittest import mock @@ -214,11 +215,12 @@ def test_api(self) -> None: ] self.assertEqual(expected, literal_mappings) - grounder = get_grounder(TEST_P1) - scored_match = grounder.ground_best(syn1) - self.assertIsNotNone(scored_match) - self.assertEqual(TEST_P1, scored_match.term.db) - self.assertEqual("1", scored_match.term.id) + if importlib.util.find_spec("gilda"): + grounder = get_grounder(TEST_P1) + scored_match = grounder.ground_best(syn1) + self.assertIsNotNone(scored_match) + self.assertEqual(TEST_P1, scored_match.term.db) + self.assertEqual("1", scored_match.term.id) # Properties diff --git a/tox.ini b/tox.ini index fe9d193f..41e9d049 100644 --- a/tox.ini +++ b/tox.ini @@ -45,7 +45,6 @@ commands = extras = # See the [project.optional-dependencies] entry in pyproject.toml for "tests" tests - grounding set_env = # this setting gets inherited into all environments, meaning # that things that call uv commands don't require a --preview