Skip to content

Commit

Permalink
tests: speed up tests (#283)
Browse files Browse the repository at this point in the history
update Makefile and test_all_abstasks.py
  • Loading branch information
MartinBernstorff authored Mar 25, 2024
1 parent 6675bb8 commit 2155bf6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
7 changes: 1 addition & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,7 @@ lint:

test:
@echo "--- 🧪 Running tests ---"
pytest

test-parallel:
@echo "--- 🧪 Running tests ---"
@echo "Note that parallel tests can sometimes cause issues with some tests."
pytest -n auto --dist=loadfile -s -v
pytest -n auto --durations=5

pr:
@echo "--- 🚀 Running requirements for a PR ---"
Expand Down
7 changes: 3 additions & 4 deletions tests/test_all_abstasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@

from mteb import MTEB
from mteb.abstasks import AbsTask
from mteb.tasks.BitextMining import BUCCBitextMining
from mteb.tasks.BitextMining.da.BornholmskBitextMining import BornholmBitextMining

logging.basicConfig(level=logging.INFO)
from mteb import MTEB


def test_two_mteb_tasks():
Expand All @@ -31,7 +30,7 @@ def test_two_mteb_tasks():
@pytest.mark.parametrize(
"task",
[
BUCCBitextMining(),
BornholmBitextMining(),
"TwentyNewsgroupsClustering",
"Banking77Classification",
"SciDocsRR",
Expand All @@ -44,7 +43,7 @@ def test_two_mteb_tasks():
@pytest.mark.parametrize(
"model_name",
[
"average_word_embeddings_komninos",
"average_word_embeddings_levy_dependency",
],
)
def test_mteb_task(task: Union[str, AbsTask], model_name: str):
Expand Down

0 comments on commit 2155bf6

Please sign in to comment.