Skip to content

Commit a649a61

Browse files
committed
added interface test
1 parent 336f4bc commit a649a61

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

tests/test_libzim_creator.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -688,6 +688,15 @@ def get_wordcount(self):
688688
assert search.getEstimatedMatches() == expected
689689

690690

691+
def test_indexdata_interface():
692+
default_id = IndexData()
693+
assert default_id.has_indexdata() is False
694+
for method in ("title", "content", "keywords", "wordcount"):
695+
with pytest.raises(NotImplementedError):
696+
getattr(default_id, f"get_{method}")()
697+
assert default_id.get_geoposition() is None
698+
699+
691700
def test_reimpfeed(fpath):
692701
class AContentProvider:
693702
def __init__(self):

0 commit comments

Comments
 (0)