Skip to content

Commit f04a6ec

Browse files
authored
Move aiohttp tests to riot
Migrate aiohttp from tox to riot. Fixes #1370
1 parent 32c0d96 commit f04a6ec

File tree

4 files changed

+31
-27
lines changed

4 files changed

+31
-27
lines changed

.circleci/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,8 @@ jobs:
465465
aiohttp:
466466
<<: *contrib_job
467467
steps:
468-
- run_tox_scenario:
469-
pattern: '^aiohttp_contrib-'
468+
- run_test:
469+
pattern: 'aiohttp'
470470

471471
asgi:
472472
<<: *contrib_job_small

riotfile.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,6 +1153,30 @@ def select_pys(min_version=MIN_PYTHON_VERSION, max_version=MAX_PYTHON_VERSION):
11531153
},
11541154
command="pytest {cmdargs} tests/contrib/aiopg",
11551155
),
1156+
Venv(
1157+
name="aiohttp",
1158+
command="pytest {cmdargs} tests/contrib/aiohttp",
1159+
pkgs={"pytest-aiohttp": [latest]},
1160+
venvs=[
1161+
Venv(
1162+
pys=select_pys(min_version="3.5", max_version="3.6"),
1163+
pkgs={
1164+
"aiohttp": ["~=2.0", "~=2.1", "~=2.2", "~=2.3"],
1165+
"aiohttp_jinja2": ["~=0.12", "~=0.13", "~=0.15"],
1166+
"yarl": "~=0.18.0",
1167+
},
1168+
),
1169+
Venv(
1170+
# Python 3.5 is deprecated for aiohttp >= 3.0
1171+
pys=select_pys(min_version="3.6"),
1172+
pkgs={
1173+
"aiohttp": ["~=3.0", "~=3.1", "~=3.2", "~=3.3", "~=3.4", "~=3.5", "~=3.6"],
1174+
"aiohttp_jinja2": "~=0.15",
1175+
"yarl": "~=1.0",
1176+
},
1177+
),
1178+
],
1179+
),
11561180
Venv(
11571181
name="jinja2",
11581182
venvs=[

tests/contrib/aiohttp/test_templates.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
import sys
2+
3+
import pytest
4+
15
from .app.web import set_filesystem_loader
26
from .app.web import set_package_loader
37

@@ -43,6 +47,7 @@ async def test_template_rendering_filesystem(untraced_app_tracer, aiohttp_client
4347
assert 0 == span.error
4448

4549

50+
@pytest.mark.skipif(sys.version_info < (3, 6), reason="Not compatible with Python 3.5")
4651
async def test_template_rendering_package(untraced_app_tracer, aiohttp_client, loop):
4752
app, tracer = untraced_app_tracer
4853
client = await aiohttp_client(app)

tox.ini

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,6 @@ envlist =
2222
{py27,py35,py36,py37,py38,py39,py310}-profile-minreqs{,-gevent}
2323
py{27,35,36,37,38,39,310}-integration-{v5,latest,snapshot}
2424
# Integrations environments
25-
# Python 3.7 needs at least aiohttp 2.3
26-
aiohttp_contrib-{py35,py36}-aiohttp{20,21,22}-aiohttp_jinja{012,013}-yarl-pytest3
27-
aiohttp_contrib-{py35,py36,py37,py38}-aiohttp23-aiohttp_jinja015-yarl10-pytest3
28-
aiohttp_contrib-{py35,py36,py37}-aiohttp{30,31,32,33,35,36}-aiohttp_jinja{015}-yarl10-pytest3
29-
aiohttp_contrib-py{38,39}-aiohttp{30,31,32,33,36}-aiohttp_jinja015-yarl10-pytest3
3025
algoliasearch_contrib-py{27,35,36,37,38,39,310}-algoliasearch{1,2,}
3126
asyncio_contrib-py{35,36,37,38,39,310}
3227
bottle_contrib{,_autopatch}-py{27,35,36,37,38,39}-bottle{11,12,}-webtest
@@ -121,28 +116,9 @@ deps =
121116
py39-profile-minreqs-gevent: greenlet==0.4.16
122117
py310-profile-minreqs-gevent: gevent==21.8.0
123118
py310-profile-minreqs-gevent: greenlet==1.1.0
124-
# force the downgrade as a workaround
125-
# https://github.com/aio-libs/aiohttp/issues/2662
126-
yarl: yarl==0.18.0
127-
yarl10: yarl>=1.0,<1.1
128119
# backports
129120
py27: enum34
130121
# integrations
131-
aiohttp_contrib: pytest-aiohttp
132-
aiohttp20: aiohttp>=2.0,<2.1
133-
aiohttp21: aiohttp>=2.1,<2.2
134-
aiohttp22: aiohttp>=2.2,<2.3
135-
aiohttp23: aiohttp>=2.3,<2.4
136-
aiohttp30: aiohttp>=3.0,<3.1
137-
aiohttp31: aiohttp>=3.1,<3.2
138-
aiohttp32: aiohttp>=3.2,<3.3
139-
aiohttp33: aiohttp>=3.3,<3.4
140-
aiohttp34: aiohttp>=3.4,<3.5
141-
aiohttp35: aiohttp>=3.5,<3.6
142-
aiohttp36: aiohttp>=3.6,<3.7
143-
aiohttp_jinja012: aiohttp_jinja2>=0.12,<0.13
144-
aiohttp_jinja013: aiohttp_jinja2>=0.13,<0.14
145-
aiohttp_jinja015: aiohttp_jinja2>=0.15,<0.16
146122
algoliasearch: algoliasearch
147123
algoliasearch1: algoliasearch>=1.2,<2
148124
algoliasearch2: algoliasearch>=2,<3
@@ -288,7 +264,6 @@ commands =
288264
opentracer_gevent: pytest {posargs} tests/opentracer/test_tracer_gevent.py
289265
integration-{v5,latest,snapshot}: pytest --no-cov {posargs} tests/integration/
290266
# Contribs
291-
aiohttp_contrib: pytest {posargs} tests/contrib/aiohttp
292267
algoliasearch_contrib: pytest {posargs} tests/contrib/algoliasearch
293268
asyncio_contrib: pytest {posargs} tests/contrib/asyncio
294269
bottle_contrib: pytest {posargs} --ignore="tests/contrib/bottle/test_autopatch.py" tests/contrib/bottle/

0 commit comments

Comments
 (0)