Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cthoyt committed Jan 21, 2025
1 parent c0168ed commit 5073d26
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
12 changes: 7 additions & 5 deletions tests/test_api.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""Tests for alternative identifiers."""

import importlib.util
import unittest
from contextlib import ExitStack
from unittest import mock
Expand Down Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5073d26

Please sign in to comment.