Reorder tests to make them more stable (#1835)

This commit is contained in:
Rys Artem 2020-03-30 17:06:24 +02:00 committed by GitHub
parent f20953f7a9
commit d55d981e22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -208,18 +208,6 @@ class TestBot(object):
assert message_quiz.poll.type == Poll.QUIZ
assert message_quiz.poll.is_closed
@flaky(3, 1)
@pytest.mark.timeout(10)
def test_send_game(self, bot, chat_id):
game_short_name = 'test_game'
message = bot.send_game(chat_id, game_short_name)
assert message.game
assert message.game.description == ('A no-op test game, for python-telegram-bot '
'bot framework testing.')
assert message.game.animation.file_id != ''
assert message.game.photo[0].file_size == 851
@flaky(3, 1)
@pytest.mark.timeout(10)
def test_send_chat_action(self, bot, chat_id):
@ -596,6 +584,18 @@ class TestBot(object):
def test_delete_chat_sticker_set(self):
pass
@flaky(3, 1)
@pytest.mark.timeout(10)
def test_send_game(self, bot, chat_id):
game_short_name = 'test_game'
message = bot.send_game(chat_id, game_short_name)
assert message.game
assert message.game.description == ('A no-op test game, for python-telegram-bot '
'bot framework testing.')
assert message.game.animation.file_id != ''
assert message.game.photo[0].file_size == 851
@flaky(3, 1)
@pytest.mark.timeout(10)
def test_set_game_score_1(self, bot, chat_id):
@ -795,17 +795,17 @@ class TestBot(object):
assert isinstance(invite_link, string_types)
assert invite_link != ''
@flaky(3, 1)
@pytest.mark.timeout(10)
def test_delete_chat_photo(self, bot, channel_id):
assert bot.delete_chat_photo(channel_id)
@flaky(3, 1)
@pytest.mark.timeout(10)
def test_set_chat_photo(self, bot, channel_id):
with open('tests/data/telegram_test_channel.jpg', 'rb') as f:
assert bot.set_chat_photo(channel_id, f)
@flaky(3, 1)
@pytest.mark.timeout(10)
def test_delete_chat_photo(self, bot, channel_id):
assert bot.delete_chat_photo(channel_id)
@flaky(3, 1)
@pytest.mark.timeout(10)
def test_set_chat_title(self, bot, channel_id):