Skip to content

Commit

Permalink
Fix warning about asyncio marker (#1078)
Browse files Browse the repository at this point in the history
  • Loading branch information
danfimov committed Dec 30, 2022
1 parent 491c2ca commit 64eb41d
Show file tree
Hide file tree
Showing 11 changed files with 1 addition and 24 deletions.
1 change: 1 addition & 0 deletions tests/conftest.py
Expand Up @@ -20,6 +20,7 @@ def pytest_addoption(parser):
default=None,
help="run tests which require redis connection",
)
parser.addini("asyncio_mode", "", default='auto')


def pytest_configure(config):
Expand Down
2 changes: 0 additions & 2 deletions tests/test_bot.py
Expand Up @@ -3,8 +3,6 @@
from aiogram import Bot, types
from . import BOT_ID, FakeTelegram

pytestmark = pytest.mark.asyncio


async def test_get_me(bot: Bot):
""" getMe method test """
Expand Down
2 changes: 0 additions & 2 deletions tests/test_bot/test_bot_download_file.py
Expand Up @@ -13,8 +13,6 @@
from tests import TOKEN
from tests.types.dataset import FILE

pytestmark = pytest.mark.asyncio


@pytest_asyncio.fixture(name='bot')
async def bot_fixture():
Expand Down
3 changes: 0 additions & 3 deletions tests/test_contrib/test_fsm_storage/test_storage.py
Expand Up @@ -6,10 +6,7 @@

from aiogram.contrib.fsm_storage.memory import MemoryStorage
from aiogram.contrib.fsm_storage.redis import RedisStorage, RedisStorage2
from aiogram.types import Chat, User
from tests.types.dataset import CHAT, USER

pytestmark = pytest.mark.asyncio

@pytest_asyncio.fixture()
@pytest.mark.redis
Expand Down
2 changes: 0 additions & 2 deletions tests/test_dispatcher.py
Expand Up @@ -2,8 +2,6 @@

from aiogram import Dispatcher, Bot

pytestmark = pytest.mark.asyncio


class TestDispatcherInit:
async def test_successful_init(self, bot):
Expand Down
@@ -1,10 +1,7 @@
from unittest.mock import AsyncMock

import pytest
from aiogram.dispatcher.middlewares import LifetimeControllerMiddleware

pytestmark = pytest.mark.asyncio


async def test_no_skip():
class Middleware(LifetimeControllerMiddleware):
Expand Down
3 changes: 0 additions & 3 deletions tests/test_filters.py
Expand Up @@ -6,9 +6,6 @@
from aiogram.dispatcher.filters import Text, CommandStart
from aiogram.types import Message, CallbackQuery, InlineQuery, Poll

# enable asyncio mode
pytestmark = pytest.mark.asyncio


def data_sample_1():
return [
Expand Down
2 changes: 0 additions & 2 deletions tests/test_message.py
Expand Up @@ -4,8 +4,6 @@
from aiogram import Bot, types
from . import FakeTelegram

pytestmark = pytest.mark.asyncio


@pytest_asyncio.fixture(name="message")
async def message_fixture(bot: Bot):
Expand Down
2 changes: 0 additions & 2 deletions tests/test_utils/test_deep_linking.py
Expand Up @@ -8,8 +8,6 @@
)
from tests.types import dataset

# enable asyncio mode
pytestmark = pytest.mark.asyncio

PAYLOADS = [
'foo',
Expand Down
3 changes: 0 additions & 3 deletions tests/types/test_chat.py
@@ -1,10 +1,7 @@
import pytest

from aiogram import Bot, types
from .dataset import CHAT, FULL_CHAT
from .. import FakeTelegram

pytestmark = pytest.mark.asyncio

chat = types.Chat(**CHAT)

Expand Down
2 changes: 0 additions & 2 deletions tests/types/test_mixins.py
Expand Up @@ -14,8 +14,6 @@
from tests import TOKEN
from tests.types.dataset import FILE

pytestmark = pytest.mark.asyncio


@pytest_asyncio.fixture(name='bot')
async def bot_fixture():
Expand Down

0 comments on commit 64eb41d

Please sign in to comment.