We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe69a5c commit 258d0a7Copy full SHA for 258d0a7
tests/integrations/aiohttp/test_aiohttp.py
@@ -5,6 +5,12 @@
5
from unittest import mock
6
7
import pytest
8
+
9
+try:
10
+ import pytest_asyncio
11
+except ImportError:
12
+ pytest_asyncio = None
13
14
from aiohttp import web, ClientSession
15
from aiohttp.client import ServerDisconnectedError
16
from aiohttp.web_request import Request
@@ -21,6 +27,14 @@
21
27
from tests.conftest import ApproxDict
22
28
23
29
30
+if pytest_asyncio is None:
31
+ # `loop` was deprecated in `pytest-aiohttp`
32
+ # in favor of `event_loop` from `pytest-asyncio`
33
+ @pytest.fixture
34
+ def event_loop(loop):
35
+ yield loop
36
37
24
38
@pytest.mark.asyncio
25
39
async def test_basic(sentry_init, aiohttp_client, capture_events):
26
40
sentry_init(integrations=[AioHttpIntegration()])
0 commit comments