forked from missytake/team-bot
tests: add timeout for complex tests
This commit is contained in:
parent
6095a17ee2
commit
22d8f87746
|
@ -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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue