Skip to content

Commit 99c5c59

Browse files
committed
FIX: Fix stemmer test
The term 'intern' is not found anymore in the search index. Based on the original commmit sphinx-doc@e04fe84 it was expected to be the stem of "International" However, if you put "International" in https://snowballstem.org/demo.html, you get "internat" instead. I thus assume that stemming behavior has changed and we should just update the expected value. While at it, I removed the debug print from the original commit.
1 parent cc7c6f4 commit 99c5c59

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

tests/test_search.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,9 +142,8 @@ def test_stemmer_does_not_remove_short_words(app: SphinxTestApp) -> None:
142142
def test_stemmer(app: SphinxTestApp) -> None:
143143
app.build(force_all=True)
144144
searchindex = load_searchindex(app.outdir / 'searchindex.js')
145-
print(searchindex)
146145
assert is_registered_term(searchindex, 'findthisstemmedkey')
147-
assert is_registered_term(searchindex, 'intern')
146+
assert is_registered_term(searchindex, 'internat')
148147

149148

150149
@pytest.mark.sphinx('html', testroot='search')

0 commit comments

Comments
 (0)