From 788afb5e66dd35ea7fa1ac7944854d86ef0f10e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Tue, 6 Aug 2024 14:57:56 +0200 Subject: [PATCH] test_depsolve.py: add IDs to test cases MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Increase the readability of pytest verbose output by assigning simple IDs to each test case. Signed-off-by: Tomáš Hozza --- tools/test/test_depsolve.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/test/test_depsolve.py b/tools/test/test_depsolve.py index 387cd52c..23040aa9 100644 --- a/tools/test/test_depsolve.py +++ b/tools/test/test_depsolve.py @@ -85,8 +85,13 @@ def repo_servers_fixture(): p.kill() +def tcase_idfn(param): + return param['id'] + + test_cases = [ { + "id": "basic_1pkg_1repo", "transactions": [ { "package-specs": [ @@ -116,8 +121,9 @@ test_cases = [ }, } }, + # "pkg-with-no-deps" is the only package in the custom repo and has no dependencies { - # "pkg-with-no-deps" is the only package in the custom repo and has no dependencies + "id": "basic_1pkg_1repo_no_deps", "transactions": [ { "package-specs": [ @@ -131,6 +137,7 @@ test_cases = [ }, }, { + "id": "basic_2pkgs_2repos", "transactions": [ { "package-specs": [ @@ -236,7 +243,7 @@ def config_combos(tmp_path, servers): yield repo_configs, os.fspath(root_dir), opt_metadata -@pytest.mark.parametrize("test_case", test_cases) +@pytest.mark.parametrize("test_case", test_cases, ids=tcase_idfn) @pytest.mark.parametrize("dnf_config, detect_fn", [ (None, assert_dnf), ('{"use_dnf5": false}', assert_dnf),