Skip to content

Commit

Permalink
Move fixture to conftest file to fix linting issue
Browse files Browse the repository at this point in the history
  • Loading branch information
CaroFG committed Feb 7, 2024
1 parent 2097c73 commit a25244e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
10 changes: 10 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,3 +225,13 @@ def enable_vector_search():
json={"vectorStore": False},
timeout=10,
)


@fixture
def new_embedders():
return {
"default": {
"source": "userProvided",
"dimensions": 1,
}
}
11 changes: 1 addition & 10 deletions tests/settings/test_settings_embedders.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,6 @@
from meilisearch.models.index import Embedders


@pytest.fixture
def new_embedders():
return {
"default": {
"source": "userProvided",
"dimensions": 1,
}
}


@pytest.mark.usefixtures("enable_vector_search")
def test_get_default_embedders(empty_index):
"""Tests getting default embedders."""
Expand All @@ -33,6 +23,7 @@ def test_update_embedders_with_user_provided_source(new_embedders, empty_index):


@pytest.mark.usefixtures("enable_vector_search")
@pytest.mark.usefixtures("new_embedders")
def test_reset_embedders(new_embedders, empty_index):
"""Tests resetting the typo_tolerance setting to its default value."""
index = empty_index()
Expand Down

0 comments on commit a25244e

Please sign in to comment.