mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-17 04:25:13 +00:00
Handle expected warnings & raise unexpected warnings (#1315)
* chore: replace fixture loop with event_loop
* chore: mark expected warnings
* chore: raise unexpected warnings
* chore: rm unused record
* fix: rm parenthesized context manager
* chore: warnings shall not pass
* chore: replace fixture loop with event_loop
* chore: mark expected warnings
* chore: raise unexpected warnings
* chore: rm unused record
* fix: rm parenthesized context manager
* chore: warnings shall not pass
* Revert "chore: raise unexpected warnings"
This reverts commit 4c91df243d.
* chore: warnings shall not pass v2
* fix: graceful aiohttp session close
* chore: minor typo
* chore: mark expected warnings
* fix: temporary mute ResourceWarning
#1320
* fix: close pool with redis
* chore: code reformat and lint
* chore: simplify tests with fixture
* chore: make aresponses clear
* chore: divide asserts with blank line
* chore: rm duplicated assertions
* chore: rm unnecessary extra
* chore: bump test dependencies
* chore: bump test dependencies (fix)
This commit is contained in:
parent
890a57cd15
commit
eacea996d4
12 changed files with 198 additions and 158 deletions
|
|
@ -13,9 +13,9 @@ from tests.mocked_bot import MockedBot
|
|||
|
||||
|
||||
class TestChatActionSender:
|
||||
async def test_wait(self, bot: Bot, loop: asyncio.BaseEventLoop):
|
||||
async def test_wait(self, bot: Bot, event_loop: asyncio.BaseEventLoop):
|
||||
sender = ChatActionSender.typing(bot=bot, chat_id=42)
|
||||
loop.call_soon(sender._close_event.set)
|
||||
event_loop.call_soon(sender._close_event.set)
|
||||
start = time.monotonic()
|
||||
await sender._wait(1)
|
||||
assert time.monotonic() - start < 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue