From 7798206732bac4df03cd7353c467e05e51910875 Mon Sep 17 00:00:00 2001 From: Hood Chatham Date: Tue, 18 Feb 2025 18:12:24 +0100 Subject: [PATCH] Give more time to test_tarfile core python test --- src/tests/python_tests.yaml | 1 + src/tests/test_core_python.py | 15 +++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/src/tests/python_tests.yaml b/src/tests/python_tests.yaml index e56ba063c9d..4c9e769bcbc 100644 --- a/src/tests/python_tests.yaml +++ b/src/tests/python_tests.yaml @@ -706,6 +706,7 @@ - test_syslog - test_tabnanny - test_tarfile: + timeout: 60 skip: - test_sly_relative0 - test_tcl diff --git a/src/tests/test_core_python.py b/src/tests/test_core_python.py index 8e538acfa40..87d02ff82f9 100644 --- a/src/tests/test_core_python.py +++ b/src/tests/test_core_python.py @@ -109,11 +109,18 @@ def get_tests() -> list[tuple[str, dict[str, Any]]]: def pytest_generate_tests(metafunc): if "main_test" in metafunc.fixturenames: tests = get_tests() + params = [] + for t in tests: + if timeout := t[1].get("driver_timeout"): + marks = [ + pytest.mark.requires_dynamic_linking, + pytest.mark.driver_timeout(timeout), + ] + else: + marks = [pytest.mark.requires_dynamic_linking] + params.append(pytest.param(t, marks=marks)) metafunc.parametrize( "main_test", - [ - pytest.param(t, marks=pytest.mark.requires_dynamic_linking) - for t in tests - ], + params, ids=[t[0] for t in tests], )