JosXa / tgintegration

Integration test and automation library for Telegram Messenger bots based on Pyrogram.
https://josxa.github.io/tgintegration/
MIT License
119 stars 18 forks source link

_raise=False failure to catch TimeoutError on python 3.7 #22

Closed Deer-Spangle closed 3 years ago

Deer-Spangle commented 3 years ago

Description

Running a test which is ensuring the bot does not respond, like so:

async with controller.collect(peer=group_id, raise_=False) as response:
    await controller.client.send_photo(group_id, thumb_link
assert response.num_messages == 0

What I Did

It passes fine using python 3.8, but on python 3.7 it fails to catch the TimeoutError. See this build log: https://travis-ci.com/github/Deer-Spangle/FA-search-bot/jobs/439782520 for the full traceback

Deer-Spangle commented 3 years ago

This is no longer blocking me, as I have upgraded my dev machine, live environment, and CI builds to use Python 3.8

JosXa commented 3 years ago

3.7 has been deprecated.