From 7bc906011f3dc15ee884153be90ab6bfeda894dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Mon, 22 Nov 2021 13:11:29 +0545 Subject: [PATCH] tests: timeout only on functions, excluding tests fixtures Sometimes, `tmp_dir` fixtures take longer than a second. Using `func_only` makes it only consider duration of test function run, excluding fixtures duration. --- tests/func/experiments/test_init.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/func/experiments/test_init.py b/tests/func/experiments/test_init.py index f8a14e887..b2e4c9e94 100644 --- a/tests/func/experiments/test_init.py +++ b/tests/func/experiments/test_init.py @@ -10,7 +10,7 @@ from dvc.repo.experiments.init import init from dvc.stage.exceptions import DuplicateStageName # the tests may hang on prompts on failure -pytestmark = pytest.mark.timeout(1) +pytestmark = pytest.mark.timeout(1, func_only=True) def test_init_simple(tmp_dir, scm, dvc, capsys):