mirror of
https://github.com/aiogram/aiogram.git
synced 2026-04-08 16:37:47 +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
|
|
@ -3,7 +3,6 @@ import pytest
|
|||
from aiogram.utils.backoff import Backoff, BackoffConfig
|
||||
|
||||
BACKOFF_CONFIG = BackoffConfig(min_delay=0.1, max_delay=1.0, factor=2.0, jitter=0.0)
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestBackoffConfig:
|
||||
|
|
|
|||
|
|
@ -11,8 +11,6 @@ from aiogram.types import Chat, Message, User
|
|||
from aiogram.utils.chat_action import ChatActionMiddleware, ChatActionSender
|
||||
from tests.mocked_bot import MockedBot
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
class TestChatActionSender:
|
||||
async def test_wait(self, bot: Bot, loop: asyncio.BaseEventLoop):
|
||||
|
|
|
|||
|
|
@ -22,8 +22,6 @@ WRONG_PAYLOADS = [
|
|||
1234567890123456789.0,
|
||||
]
|
||||
|
||||
pytestmark = pytest.mark.asyncio
|
||||
|
||||
|
||||
@pytest.fixture(params=PAYLOADS, name="payload")
|
||||
def payload_fixture(request):
|
||||
|
|
|
|||
|
|
@ -87,7 +87,6 @@ async def next_call(event, data):
|
|||
return gettext("test")
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
class TestSimpleI18nMiddleware:
|
||||
@pytest.mark.parametrize(
|
||||
"event_from_user,result",
|
||||
|
|
@ -133,7 +132,6 @@ class TestSimpleI18nMiddleware:
|
|||
assert locale == i18n.default_locale
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
class TestConstI18nMiddleware:
|
||||
async def test_middleware(self, i18n: I18n):
|
||||
middleware = ConstI18nMiddleware(i18n=i18n, locale="uk")
|
||||
|
|
@ -145,7 +143,6 @@ class TestConstI18nMiddleware:
|
|||
assert result == "тест"
|
||||
|
||||
|
||||
@pytest.mark.asyncio
|
||||
class TestFSMI18nMiddleware:
|
||||
async def test_middleware(self, i18n: I18n, bot: MockedBot):
|
||||
middleware = FSMI18nMiddleware(i18n=i18n)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue