Maximum coverage

This commit is contained in:
Alex Root Junior 2019-11-28 23:52:02 +02:00
parent 6fadb8feb2
commit e37395b161
3 changed files with 5 additions and 3 deletions

View file

@ -62,7 +62,8 @@ class AiohttpSession(BaseSession):
return self
def __deepcopy__(self: T, memo: Optional[Dict[int, Any]] = None) -> T:
if memo is None:
if memo is None: # pragma: no cover
# This block was never be called
memo = {}
cls = self.__class__

View file

@ -3,7 +3,6 @@ import copy
import pytest
from asynctest import CoroutineMock, patch
from aiogram import Bot
from aiogram.api.client.base import BaseBot
from aiogram.api.client.session.aiohttp import AiohttpSession
from aiogram.api.methods import GetMe
@ -22,6 +21,7 @@ class TestBaseBot:
def test_equals(self):
base_bot = BaseBot("42:TEST")
assert base_bot == BaseBot("42:TEST")
assert base_bot != "42:TEST"
@pytest.mark.asyncio
async def test_emit(self):

View file

@ -2,11 +2,12 @@ import datetime
import time
import pytest
from asynctest import MagicMock, patch
from aiogram import Bot
from aiogram.api.types import Chat, Message, Update, User
from aiogram.dispatcher.dispatcher import Dispatcher
from aiogram.dispatcher.router import Router
from asynctest import MagicMock, patch
class TestDispatcher: