mirror of
https://github.com/python-telegram-bot/python-telegram-bot.git
synced 2024-11-22 23:27:49 +01:00
mark some occasionally failing tests as flaky
This commit is contained in:
parent
b63877b1f2
commit
4da7656659
2 changed files with 4 additions and 0 deletions
|
@ -20,6 +20,7 @@ import logging
|
|||
from time import sleep
|
||||
|
||||
import pytest
|
||||
from flaky import flaky
|
||||
|
||||
from telegram import (
|
||||
CallbackQuery,
|
||||
|
@ -902,6 +903,7 @@ class TestConversationHandler:
|
|||
assert handler.conversations.get((self.group.id, user1.id)) is None
|
||||
assert self.is_timeout
|
||||
|
||||
@flaky(3, 1)
|
||||
def test_conversation_timeout_keeps_extending(self, dp, bot, user1):
|
||||
handler = ConversationHandler(
|
||||
entry_points=self.entry_points,
|
||||
|
|
|
@ -450,6 +450,7 @@ class TestUpdater:
|
|||
)
|
||||
assert self.test_flag is True
|
||||
|
||||
@flaky(3, 1)
|
||||
def test_clean_deprecation_warning_webhook(self, recwarn, updater, monkeypatch):
|
||||
monkeypatch.setattr(updater.bot, 'set_webhook', lambda *args, **kwargs: True)
|
||||
monkeypatch.setattr(updater.bot, 'delete_webhook', lambda *args, **kwargs: True)
|
||||
|
@ -465,6 +466,7 @@ class TestUpdater:
|
|||
assert str(recwarn[0].message).startswith('Old Handler API')
|
||||
assert str(recwarn[1].message).startswith('The argument `clean` of')
|
||||
|
||||
@flaky(3, 1)
|
||||
def test_clean_deprecation_warning_polling(self, recwarn, updater, monkeypatch):
|
||||
monkeypatch.setattr(updater.bot, 'set_webhook', lambda *args, **kwargs: True)
|
||||
monkeypatch.setattr(updater.bot, 'delete_webhook', lambda *args, **kwargs: True)
|
||||
|
|
Loading…
Reference in a new issue