Skip to content

Commit

Permalink
add slow marker to skip skip slow tests locally
Browse files Browse the repository at this point in the history
  • Loading branch information
edknv committed Nov 7, 2023
1 parent a59b904 commit f9c651b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import pytest


def pytest_collection_modifyitems(items):
def pytest_collection_modifyitems(config, items):
skip_slow = pytest.mark.skip(reason="need --runslow option to run")
for item in items:
path = item.location[0]
if "/tf_backend/" in path:
Expand All @@ -14,3 +15,5 @@ def pytest_collection_modifyitems(items):
item.add_marker(pytest.mark.tensorflow)
item.add_marker(pytest.mark.pytorch)
item.add_marker(pytest.mark.jax)
if "slow" in item.keywords:
item.add_marker(skip_slow)
1 change: 1 addition & 0 deletions tests/report/beir/test_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ def test_no_invalid_scores(
assert not np.isinf(ndcg).any()


@pytest.mark.slow
@pytest.mark.benchmark(
warmup_iterations=1,
)
Expand Down

0 comments on commit f9c651b

Please sign in to comment.