Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ def pytest_collection_modifyitems(config, items):

_skip_all_cb_and_fp8_tests(items)

_skip_unsupported_compiler_tests(config, items)


def _mark_all_e2e(items):
"""Mark all tests within the e2e package with the e2e marker"""
Expand Down Expand Up @@ -77,6 +79,21 @@ def _skip_all_cb_and_fp8_tests(items):
item.add_marker(skip_marker)


def _skip_unsupported_compiler_tests(config, items):
"""Skip all tests that need compiler changes to run.
This can be relaxed once the compiler changes are in place
"""

markexpr = config.option.markexpr
if "compiler_support_16k" in markexpr:
return # let pytest handle the collection logic

skip_marker = pytest.mark.skip(reason="Needs compiler changes")
for item in items:
if "spyre" in item.keywords and "compiler_support_16k" in item.keywords:
item.add_marker(skip_marker)


@pytest.fixture(autouse=True)
def init_test_http_connection():
# pytest_asyncio may use a different event loop per test
Expand Down
2 changes: 2 additions & 0 deletions tests/e2e/test_spyre_cb.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def test_api_cb_generates_correct_max_tokens(
assert response.usage.completion_tokens == max_tokens


@pytest.mark.compiler_support_16k
@pytest.mark.cb
@pytest.mark.parametrize("model", get_spyre_model_list())
@pytest.mark.parametrize(
Expand Down Expand Up @@ -184,6 +185,7 @@ def test_long_context_batches(
force_engine_shutdown(vllm_model)


@pytest.mark.compiler_support_16k
@pytest.mark.spyre
@pytest.mark.cb
@pytest.mark.parametrize(
Expand Down