Skip to content

tests: Regenerate tox.ini & fix CI #4435

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

Merged
merged 11 commits into from
Jun 3, 2025
Merged
Show file tree
Hide file tree
Changes from 10 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
8 changes: 6 additions & 2 deletions scripts/populate_tox/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,14 @@
"pytest-django",
"Werkzeug",
],
">=3.0": ["pytest-asyncio"],
">=2.0": ["channels[daphne]"],
">=2.2,<3.1": ["six"],
">=3.0": ["pytest-asyncio"],
"<3.3": [
"djangorestframework>=3.0,<4.0",
"Werkzeug<2.1.0",
],
"<3.1": ["pytest-django<4.0"],
">=2.0": ["channels[daphne]"],
},
},
"dramatiq": {
Expand Down Expand Up @@ -163,6 +163,10 @@
"spark": {
"package": "pyspark",
"python": ">=3.8",
# XXX: spark 4.0.0 needs a different java version installed
# need to find a way to activate different java versions for <4.0
# and >=4.0
"include": "!=4.0.0",
},
"sqlalchemy": {
"package": "sqlalchemy",
Expand Down
1 change: 1 addition & 0 deletions scripts/populate_tox/tox.jinja
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ deps =
# for justification of the upper bound on pytest
{py3.6,py3.7}-gevent: pytest<7.0.0
{py3.8,py3.9,py3.10,py3.11,py3.12}-gevent: pytest
gevent: pytest-asyncio

# === Integrations ===

Expand Down
15 changes: 15 additions & 0 deletions tests/integrations/django/asgi/test_asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
@pytest.mark.parametrize("application", APPS)
@pytest.mark.asyncio
@pytest.mark.forked
@pytest.mark.skipif(
django.VERSION < (3, 0), reason="Django ASGI support shipped in 3.0"
)
async def test_basic(sentry_init, capture_events, application):
sentry_init(
integrations=[DjangoIntegration()],
Expand Down Expand Up @@ -579,6 +582,9 @@ async def test_asgi_request_body(
"asyncio.iscoroutinefunction has been replaced in 3.12 by inspect.iscoroutinefunction"
),
)
@pytest.mark.skipif(
django.VERSION < (3, 0), reason="Django ASGI support shipped in 3.0"
)
async def test_asgi_mixin_iscoroutinefunction_before_3_12():
sentry_asgi_mixin = _asgi_middleware_mixin_factory(lambda: None)

Expand Down Expand Up @@ -636,6 +642,9 @@ def get_response(): ...

@pytest.mark.parametrize("application", APPS)
@pytest.mark.asyncio
@pytest.mark.skipif(
django.VERSION < (3, 1), reason="async views have been introduced in Django 3.1"
)
async def test_async_view(sentry_init, capture_events, application):
sentry_init(
integrations=[DjangoIntegration()],
Expand All @@ -655,6 +664,9 @@ async def test_async_view(sentry_init, capture_events, application):

@pytest.mark.parametrize("application", APPS)
@pytest.mark.asyncio
@pytest.mark.skipif(
django.VERSION < (3, 0), reason="Django ASGI support shipped in 3.0"
)
async def test_transaction_http_method_default(
sentry_init, capture_events, application
):
Expand Down Expand Up @@ -687,6 +699,9 @@ async def test_transaction_http_method_default(

@pytest.mark.parametrize("application", APPS)
@pytest.mark.asyncio
@pytest.mark.skipif(
django.VERSION < (3, 0), reason="Django ASGI support shipped in 3.0"
)
async def test_transaction_http_method_custom(sentry_init, capture_events, application):
sentry_init(
integrations=[
Expand Down
Loading
Loading