mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-12 18:19:34 +00:00
Remove warnings about pytest asyncio mode
This commit is contained in:
parent
a0dbbcfd5d
commit
655b3a2d48
134 changed files with 30 additions and 517 deletions
|
|
@ -34,8 +34,6 @@ from aiogram.types import (
|
|||
from aiogram.types.error_event import ErrorEvent
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
async def simple_message_handler(message: Message):
|
||||
await asyncio.sleep(0.2)
|
||||
|
|
|
|||
|
|
@ -7,8 +7,6 @@ import pytest
|
|||
from aiogram.dispatcher.event.event import EventObserver
|
||||
from aiogram.dispatcher.event.handler import HandlerObject
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
async def my_handler(value: str, index: int = 0) -> Any:
|
||||
return value
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@ from aiogram.handlers import BaseHandler
|
|||
from aiogram.types import Update
|
||||
from aiogram.utils.warnings import Recommendation
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
def callback1(foo: int, bar: int, baz: int):
|
||||
return locals()
|
||||
|
|
|
|||
|
|
@ -12,9 +12,6 @@ from aiogram.dispatcher.router import Router
|
|||
from aiogram.filters import Filter
|
||||
from aiogram.types import Chat, Message, User
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
# TODO: Test middlewares in routers tree
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@ async def next_handler(*args, **kwargs):
|
|||
|
||||
|
||||
class TestUserContextMiddleware:
|
||||
@pytest.mark.asyncio
|
||||
async def test_unexpected_event_type(self):
|
||||
with pytest.raises(RuntimeError):
|
||||
await UserContextMiddleware()(next_handler, object(), {})
|
||||
|
|
|
|||
|
|
@ -3,8 +3,6 @@ import pytest
|
|||
from aiogram.dispatcher.event.bases import UNHANDLED, SkipHandler, skip
|
||||
from aiogram.dispatcher.router import Router
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestRouter:
|
||||
def test_including_routers(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue