Skip to content

Commit

Permalink
chore(requirements): unpin some test dependencies (#2430)
Browse files Browse the repository at this point in the history
* chore(requirements): unpin some test dependencies

* chore(tests): unpin `websockets` 14.2
  • Loading branch information
vytas7 authored Jan 21, 2025
1 parent 8e866bd commit f5920fe
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 10 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ jobs:
- env: "e2e_chrome"
# TODO(vytas): Something is not working correctly with the
# newly released Firefox 131.0, SeleniumBase, and our tests.
# NOTE(vytas,cycloctane): Apparently, it seems that the issue is
# caused by a segfault in Uvicorn, but it happens only in Actions.
# - env: "e2e_firefox"

steps:
Expand Down
13 changes: 4 additions & 9 deletions requirements/tests
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
coverage >= 4.1
# TODO(vytas): Our use of testtools breaks under pytest 8.2 along the lines of
# https://github.com/pytest-dev/pytest/issues/12263, unpin when fixed
# (or drop support for testtools altogether?)
pytest >= 7.0, < 8.2
pytest >= 7.0
pyyaml
requests
# TODO(vytas): Check if testtools still brings anything to the table, and
# re-enable if/when unittest2 is adjusted to support CPython 3.10.
testtools; python_version < '3.10'
testtools

# ASGI Specific (daphne is installed on a its own tox env)
# ASGI Specific (Daphne & Hypercorn are installed in their own tox env)
aiofiles
httpx
uvicorn >= 0.17.0
websockets >= 13.1, < 14.2
websockets >= 13.1

# Handler Specific
cbor2
Expand Down
6 changes: 5 additions & 1 deletion tests/asgi/test_asgi_servers.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,14 @@ async def test_select_subprotocol_unknown(self, server_url_events_ws):
except websockets.exceptions.NegotiationError as ex:
assert 'unsupported subprotocol: xmpp' in str(ex)

# Daphne, Hypercorn
# Daphne, Hypercorn with websockets<14.2
except EOFError:
pass

# Daphne, Hypercorn with websockets>=14.2
except websockets.exceptions.InvalidMessage as ex:
assert isinstance(ex.__cause__, EOFError)

# NOTE(kgriffs): When executing this test under pytest with the -s
# argument, one should be able to see the message
# "on_websocket:WebSocketDisconnected" printed to the console. I have
Expand Down

0 comments on commit f5920fe

Please sign in to comment.