Skip to content

Commit

Permalink
Merge pull request #107 from ikalnytskyi/bug/skip-asgi-websocket-on-pypy
Browse files Browse the repository at this point in the history
Skip ASGI websocket tests on PyPy
  • Loading branch information
ikalnytskyi authored Nov 17, 2024
2 parents 792f03e + f10cd09 commit 5f5a308
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,6 @@ jobs:
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "pypy-3.10"]
exclude:
# The job hangs for some reason during tests execution. :(
- os: macos-latest
python-version: pypy-3.10

runs-on: ${{ matrix.os }}
steps:
Expand Down
4 changes: 4 additions & 0 deletions tests/ext/test_asgiscopes.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""Test ASGI scopes."""

import asyncio
import sys

import async_asgi_testclient
import pytest
Expand Down Expand Up @@ -98,6 +99,9 @@ async def endpoint_ws(websocket, func=func):
def client_factory(connection_type):
"""A factory that creates synchronous test client instances."""

if connection_type == "websocket" and sys.implementation.name == "pypy":
pytest.skip("When running on PyPy, the websocket tests sometimes hang.")

def factory(app):
return ClientFacade(app, connection_type)

Expand Down

0 comments on commit 5f5a308

Please sign in to comment.