From 22d8f8774633ed3f99dcf06087a513d0612fd6de Mon Sep 17 00:00:00 2001 From: missytake Date: Mon, 9 Oct 2023 09:23:39 +0200 Subject: [PATCH] tests: add timeout for complex tests --- setup.cfg | 1 + tests/test_bot.py | 3 +++ 2 files changed, 4 insertions(+) diff --git a/setup.cfg b/setup.cfg index 33dafbd..3602e1c 100644 --- a/setup.cfg +++ b/setup.cfg @@ -51,6 +51,7 @@ passenv = * deps = pytest pytest-xdist + pytest-timeout commands = pytest tests -n 4 diff --git a/tests/test_bot.py b/tests/test_bot.py index 3b428fc..5bc0db8 100644 --- a/tests/test_bot.py +++ b/tests/test_bot.py @@ -1,7 +1,9 @@ import deltachat +import pytest from deltachat.capi import lib as dclib +@pytest.mark.timeout(60) def test_not_relay_groups(relaycrew, outsider): bot = relaycrew.bot 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) +@pytest.mark.timeout(60) def test_relay_group_forwarding(relaycrew, outsider): bot = relaycrew.bot user = relaycrew.user