Skip to content

Commit

Permalink
add coverage for bm25 fit
Browse files Browse the repository at this point in the history
  • Loading branch information
jamescalam committed Dec 2, 2023
1 parent 55cd79d commit 8d201d5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tests/unit/encoders/test_bm25.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@ def bm25_encoder():

class TestBM25Encoder:
def test_initialization(self, bm25_encoder):
bm25_encoder = BM25Encoder()
assert len(bm25_encoder.idx_mapping) != 0

def test_fit(self, bm25_encoder):
bm25_encoder.fit([
"some docs",
"and more docs",
"and even more docs"
])
assert len(bm25_encoder.idx_mapping) != 0

def test_call_method(self, bm25_encoder):
Expand Down

0 comments on commit 8d201d5

Please sign in to comment.