Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix CI tests #1650

Merged
merged 2 commits into from
Sep 29, 2022
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
2 changes: 1 addition & 1 deletion scripts/runtox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ elif [ -n "$AZURE_PYTHON_VERSION" ]; then
fi

export TOX_PARALLEL_NO_SPINNER=1
exec $TOXPATH --parallel auto -e $($TOXPATH -l | grep "$searchstring" | tr $'\n' ',') -- "${@:2}"
exec $TOXPATH -p auto -e $($TOXPATH -l | grep "$searchstring" | tr $'\n' ',') -- "${@:2}"
5 changes: 2 additions & 3 deletions tests/integrations/sanic/test_sanic.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def new_test_client(self):

Sanic.test_client = property(new_test_client)

if SANIC_VERSION >= (20, 12):
# Build (20.12.0) adds a feature where the instance is stored in an internal class
if SANIC_VERSION >= (20, 12) and SANIC_VERSION < (22, 6):
# Some builds (20.12.0 intruduced and 22.6.0 removed again) have a feature where the instance is stored in an internal class
# registry for later retrieval, and so add register=False to disable that
app = Sanic("Test", register=False)
else:
Expand Down Expand Up @@ -229,7 +229,6 @@ def __init__(self, request_body):
def respond(self, response):
responses.append(response)
patched_response = HTTPResponse()
patched_response.send = lambda end_stream: asyncio.sleep(0.001)
Copy link
Member

Choose a reason for hiding this comment

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

what was this mega hack lol

return patched_response

def __aiter__(self):
Expand Down
8 changes: 6 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ envlist =
{py3.6,py3.7}-sanic-19
{py3.6,py3.7,py3.8}-sanic-20
{py3.7,py3.8,py3.9,py3.10}-sanic-21
{py3.7,py3.8,py3.9,py3.10}-sanic-22

{py2.7}-celery-3
{py2.7,py3.5,py3.6}-celery-{4.1,4.2}
Expand Down Expand Up @@ -160,9 +161,12 @@ deps =
sanic-19: sanic>=19.0,<20.0
sanic-20: sanic>=20.0,<21.0
sanic-21: sanic>=21.0,<22.0
{py3.7,py3.8,py3.9,py3.10}-sanic-21: sanic_testing
{py3.5,py3.6}-sanic: aiocontextvars==0.2.1
sanic-22: sanic>=22.0,<22.9.0

sanic: aiohttp
sanic-21: sanic_testing<22
sanic-22: sanic_testing<22.9.0
{py3.5,py3.6}-sanic: aiocontextvars==0.2.1
py3.5-sanic: ujson<4

beam-2.12: apache-beam>=2.12.0, <2.13.0
Expand Down