tests: add timeout for complex tests

This commit is contained in:
missytake 2023-10-09 09:23:39 +02:00
parent 6095a17ee2
commit 22d8f87746
2 changed files with 4 additions and 0 deletions

View file

@ -51,6 +51,7 @@ passenv = *
deps = deps =
pytest pytest
pytest-xdist pytest-xdist
pytest-timeout
commands = commands =
pytest tests -n 4 pytest tests -n 4

View file

@ -1,7 +1,9 @@
import deltachat import deltachat
import pytest
from deltachat.capi import lib as dclib from deltachat.capi import lib as dclib
@pytest.mark.timeout(60)
def test_not_relay_groups(relaycrew, outsider): def test_not_relay_groups(relaycrew, outsider):
bot = relaycrew.bot bot = relaycrew.bot
user = relaycrew.user user = relaycrew.user
@ -37,6 +39,7 @@ def test_not_relay_groups(relaycrew, outsider):
assert not bot.relayplugin.is_relay_group(bot_message_from_user.chat) assert not bot.relayplugin.is_relay_group(bot_message_from_user.chat)
@pytest.mark.timeout(60)
def test_relay_group_forwarding(relaycrew, outsider): def test_relay_group_forwarding(relaycrew, outsider):
bot = relaycrew.bot bot = relaycrew.bot
user = relaycrew.user user = relaycrew.user