Skip to content

test: use anyio in async regression slice#288

Merged
janhilgard merged 1 commit intowaybarrios:mainfrom
Thump604:codex/pr226-async-tests
Apr 12, 2026
Merged

test: use anyio in async regression slice#288
janhilgard merged 1 commit intowaybarrios:mainfrom
Thump604:codex/pr226-async-tests

Conversation

@Thump604
Copy link
Copy Markdown
Collaborator

Derived from the current-main restack work for #226, but limited to the pushable test-side cleanup.

Changes:

  • convert the current async regression slice to @pytest.mark.anyio
  • replace asyncio.get_event_loop().run_until_complete(...) with asyncio.run(...) in the API key tests

Why split this out:

  • I also prepared the Python 3.13 CI matrix/workflow changes locally, but this auth context cannot push workflow-file updates (.github/workflows/ci.yml) because GitHub requires workflow scope for OAuth-app pushes.
  • This PR lands the tested Python-side compatibility cleanup now, without waiting on that auth limitation.

Local validation:

  • PYTHONPATH=/Users/David/code/vllm-mlx-pr226-async-tests /opt/ai-runtime/venv-live/bin/python -m pytest /Users/David/code/vllm-mlx-pr226-async-tests/tests/test_server.py -q -k "verify_api_key or reasoning_stream"
  • PYTHONPATH=/Users/David/code/vllm-mlx-pr226-async-tests /opt/ai-runtime/venv-live/bin/python -m pytest /Users/David/code/vllm-mlx-pr226-async-tests/tests/test_batching.py -q -k TestEngineAsync
  • PYTHONPATH=/Users/David/code/vllm-mlx-pr226-async-tests /opt/ai-runtime/venv-live/bin/python -m pytest /Users/David/code/vllm-mlx-pr226-async-tests/tests/test_streaming_latency.py -q -k test_output_collector
  • PYTHONPATH=/Users/David/code/vllm-mlx-pr226-async-tests /opt/ai-runtime/venv-live/bin/python -m black --check --fast /Users/David/code/vllm-mlx-pr226-async-tests/tests/test_batching.py /Users/David/code/vllm-mlx-pr226-async-tests/tests/test_batching_deterministic.py /Users/David/code/vllm-mlx-pr226-async-tests/tests/test_continuous_batching.py /Users/David/code/vllm-mlx-pr226-async-tests/tests/test_server.py /Users/David/code/vllm-mlx-pr226-async-tests/tests/test_streaming_latency.py

Related to #226.

Copy link
Copy Markdown
Collaborator

@janhilgard janhilgard left a comment

Choose a reason for hiding this comment

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

LGTM. Clean test-only changes:

  • asyncioanyio markers — broader backend compatibility, needed for Python 3.13+
  • get_event_loop().run_until_complete()asyncio.run() — the former is deprecated since 3.10 and removed from default behavior in 3.12+

No production code touched.

@janhilgard janhilgard merged commit 88b60b6 into waybarrios:main Apr 12, 2026
7 checks passed
@Thump604 Thump604 mentioned this pull request Apr 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants