Skip to content

Commit e9c429f

Browse files
Merge pull request #9 from linkml/feature/fuzzy-matching-suggestions
Feature/fuzzy matching suggestions
2 parents fe281d9 + 3d0fd52 commit e9c429f

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

tests/test_fuzzy_suggestions.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,19 @@ class TestGenerateSuggestedFix:
241241
"""Tests for suggestion generation."""
242242

243243
def test_suggests_capitalization_fix(self, validator):
244-
"""Should detect capitalization differences."""
244+
"""Should detect capitalization differences.
245+
246+
Uses a pure case difference test case where the query text matches
247+
exactly except for capitalization. Verifies that the fix message
248+
indicates "Capitalization differs".
249+
"""
245250
fix, match, score = validator.generate_suggested_fix(
246251
"jak1 protein is a tyrosine kinase",
247-
"The JAK1 protein is a tyrosine kinase that activates STAT.",
252+
"JAK1 protein is a tyrosine kinase",
248253
)
249254
assert score >= 90
250-
# May or may not detect as exact capitalization difference due to surrounding text
255+
assert fix is not None
256+
assert "Capitalization differs" in fix
251257

252258
def test_suggests_close_match(self, validator):
253259
"""Should suggest close matches."""

0 commit comments

Comments
 (0)