From 8d201d5163270b703a0fc7481c431d8c0bb12662 Mon Sep 17 00:00:00 2001 From: James Briggs <35938317+jamescalam@users.noreply.github.com> Date: Sat, 2 Dec 2023 14:37:00 -0800 Subject: [PATCH] add coverage for bm25 fit --- tests/unit/encoders/test_bm25.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/unit/encoders/test_bm25.py b/tests/unit/encoders/test_bm25.py index 3a94602e..9822d29b 100644 --- a/tests/unit/encoders/test_bm25.py +++ b/tests/unit/encoders/test_bm25.py @@ -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):