-
Notifications
You must be signed in to change notification settings - Fork 232
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update tests and removed WIP modules/objects
- Loading branch information
1 parent
c70d086
commit 42dea8d
Showing
6 changed files
with
90 additions
and
53 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import pytest | ||
|
||
from semantic_router.encoders import BM25Encoder | ||
|
||
|
||
@pytest.fixture | ||
def bm25_encoder(): | ||
return BM25Encoder() | ||
|
||
|
||
class TestBM25Encoder: | ||
def test_initialization(self): | ||
self.bm25_encoder = BM25Encoder() | ||
assert len(self.bm25_encoder.idx_mapping) != 0 | ||
|
||
def test_call_method(self): | ||
result = self.bm25_encoder(["test"]) | ||
assert isinstance(result, list), "Result should be a list" | ||
assert all( | ||
isinstance(sublist, list) for sublist in result | ||
), "Each item in result should be a list" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters