Skip to content

Commit

Permalink
Remove all explicit event_loop and mocker arguments.
Browse files Browse the repository at this point in the history
This avoids conflict between the event loop and mocker fixtures. Without this fix, the event loop fixture tries to create a new event loop with a modified socket class, causing failure.

pytest-dev/pytest-asyncio#818

This also completes "How to migrate from pytest-asyncio v0.21" in pytest-asyncio's docs.
  • Loading branch information
twisteroidambassador committed Jan 27, 2025
1 parent e09eeef commit 49b4baf
Show file tree
Hide file tree
Showing 3 changed files with 288 additions and 304 deletions.
4 changes: 2 additions & 2 deletions async_stagger/test_aitertools.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import asyncio
import itertools
from typing import AsyncIterable, List
from typing import AsyncIterable

import pytest

Expand All @@ -23,7 +23,7 @@ async def test_aiter_from_iter():
assert lst == new_lst


async def list_from_aiter(aiterable: AsyncIterable) -> List:
async def list_from_aiter(aiterable: AsyncIterable) -> list:
new_list = []
async for item in aiterable:
new_list.append(item)
Expand Down
Loading

0 comments on commit 49b4baf

Please sign in to comment.