test(telegram): guard PTB integration tests with importorskip

CI test slices don't install python-telegram-bot (optional dep), causing
a ModuleNotFoundError on collection. Add pytest.importorskip('telegram')
before the PTB imports.
This commit is contained in:
kshitijk4poor 2026-07-14 17:05:06 +05:30 committed by kshitij
parent c5aaf76468
commit adf62065a7

View file

@ -3,6 +3,8 @@
import asyncio
import pytest
pytest.importorskip("telegram") # PTB is an optional dependency; skip if absent.
from telegram.error import Conflict, TelegramError
from telegram.request import BaseRequest