Skip to content

Conversation

@eicherseiji
Copy link
Contributor

@eicherseiji eicherseiji commented Nov 14, 2025

Description

Removed incorrectly applied @pytest.mark.asyncio(scope="function") decorator from the remote_model_app fixture in test_llm_serve_integration.py.
Pytest marks have no effect on fixtures and cause a deprecation warning:

pytest.PytestRemovedIn9Warning: Marks applied to fixtures have no effect

The @pytest.mark.asyncio decorator should only be applied to test functions, not fixtures. The fixture itself doesn't need to be marked as async since it's a regular function (def, not async def). Test functions that use this fixture can still be async and have their own @pytest.mark.asyncio decorator.

Related issues

Fixes pytest deprecation warning in LLM serve integration tests.

Additional information

  • The fixture remote_model_app is not an async function, so it doesn't need asyncio-related decorators
  • This change eliminates the warning without affecting test functionality
  • Test functions that consume this fixture can still be async and use @pytest.mark.asyncio themselves

eicherseiji and others added 2 commits November 14, 2025 13:05
Signed-off-by: Seiji Eicher <seiji@anyscale.com>
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request correctly removes an unnecessary @pytest.mark.asyncio decorator from the remote_model_app fixture. Since the fixture is a synchronous generator and not an async function, the decorator was being misused. This change is a good cleanup that improves the correctness of the test code.

@nrghosh nrghosh added the go add ONLY when ready to merge, run all tests label Nov 14, 2025
@kouroshHakha kouroshHakha changed the title [serve][llm][tests-only] Remove deprecated asyncio fixture [serve][llm][tests] Remove deprecated asyncio fixture Nov 14, 2025
@kouroshHakha kouroshHakha merged commit a24e625 into ray-project:master Nov 14, 2025
7 checks passed
ArturNiederfahrenhorst pushed a commit to ArturNiederfahrenhorst/ray that referenced this pull request Nov 16, 2025
)

Signed-off-by: Seiji Eicher <seiji@anyscale.com>
Aydin-ab pushed a commit to Aydin-ab/ray-aydin that referenced this pull request Nov 19, 2025
)

Signed-off-by: Seiji Eicher <seiji@anyscale.com>
Signed-off-by: Aydin Abiar <aydin@anyscale.com>
ykdojo pushed a commit to ykdojo/ray that referenced this pull request Nov 27, 2025
)

Signed-off-by: Seiji Eicher <seiji@anyscale.com>
Signed-off-by: YK <1811651+ykdojo@users.noreply.github.com>
SheldonTsen pushed a commit to SheldonTsen/ray that referenced this pull request Dec 1, 2025
)

Signed-off-by: Seiji Eicher <seiji@anyscale.com>
Future-Outlier pushed a commit to Future-Outlier/ray that referenced this pull request Dec 7, 2025
)

Signed-off-by: Seiji Eicher <seiji@anyscale.com>
Signed-off-by: Future-Outlier <eric901201@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants