Skip to content

Commit 0cb3c5e

Browse files
committed
Fix testing async
Signed-off-by: Mihai Criveti <[email protected]>
1 parent 16eb11c commit 0cb3c5e

File tree

3 files changed

+0
-27
lines changed

3 files changed

+0
-27
lines changed

tests/conftest.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,6 @@
2929
# _session_rbac_originals = patch_rbac_decorators()
3030

3131

32-
@pytest.fixture(scope="session")
33-
def event_loop():
34-
"""Create an instance of the default event loop for each test session."""
35-
loop = asyncio.get_event_loop_policy().new_event_loop()
36-
yield loop
37-
loop.close()
38-
39-
4032
@pytest.fixture(scope="session")
4133
def test_db_url():
4234
"""Return the URL for the test database."""

tests/unit/mcpgateway/cache/test_session_registry.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -143,17 +143,6 @@ def close(self):
143143
pass
144144

145145

146-
# --------------------------------------------------------------------------- #
147-
# Event-loop fixture (pytest default loop is function-scoped) #
148-
# --------------------------------------------------------------------------- #
149-
@pytest.fixture(name="event_loop")
150-
def _event_loop_fixture():
151-
"""Provide a fresh asyncio loop for these async tests."""
152-
loop = asyncio.new_event_loop()
153-
yield loop
154-
loop.close()
155-
156-
157146
# --------------------------------------------------------------------------- #
158147
# SessionRegistry fixture (memory backend) #
159148
# --------------------------------------------------------------------------- #

tests/unit/mcpgateway/test_translate.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,14 +55,6 @@
5555
# ---------------------------------------------------------------------------#
5656

5757

58-
@pytest.fixture(scope="session")
59-
def event_loop():
60-
"""Provide a fresh event-loop for pytest-asyncio."""
61-
loop = asyncio.new_event_loop()
62-
yield loop
63-
loop.close()
64-
65-
6658
@pytest.fixture()
6759
def translate():
6860
"""Reload mcpgateway.translate for a pristine state each test."""

0 commit comments

Comments
 (0)