From d1dbcc20cf69efb4639c1bdc6540e470f3cdf216 Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Thu, 15 Aug 2024 17:04:50 +0200 Subject: [PATCH] test/depsolve: use strings for pytest.skip() The pytest.skip() argument must be a string. Calling it with an exception produces an error. --- tools/test/test_depsolve.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/test/test_depsolve.py b/tools/test/test_depsolve.py index 9423a4e4..287b0d4f 100644 --- a/tools/test/test_depsolve.py +++ b/tools/test/test_depsolve.py @@ -1250,7 +1250,7 @@ def test_depsolve(tmp_path, repo_servers, dnf_config, detect_fn, test_case): try: detect_fn() except RuntimeError as e: - pytest.skip(e) + pytest.skip(str(e)) # pylint: disable=fixme # TODO: remove this once dnf5 implementation is fixed @@ -1314,7 +1314,7 @@ def test_dump(tmp_path, repo_servers, dnf_config, detect_fn, test_case): try: detect_fn() except RuntimeError as e: - pytest.skip(e) + pytest.skip(str(e)) repo_servers_copy = repo_servers.copy() if "additional_servers" in test_case: @@ -1361,7 +1361,7 @@ def test_search(tmp_path, repo_servers, dnf_config, detect_fn, test_case): try: detect_fn() except RuntimeError as e: - pytest.skip(e) + pytest.skip(str(e)) repo_servers_copy = repo_servers.copy() if "additional_servers" in test_case: