From 66d0561914cc049912b4b5dcc13c65ebff34b20e Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Tue, 14 May 2024 08:50:24 +0100 Subject: [PATCH] Fix failing tests --- tests/pytests/functional/modules/test_pkg.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tests/pytests/functional/modules/test_pkg.py b/tests/pytests/functional/modules/test_pkg.py index 527f461aac8c..319bcce74766 100644 --- a/tests/pytests/functional/modules/test_pkg.py +++ b/tests/pytests/functional/modules/test_pkg.py @@ -217,7 +217,12 @@ def test_owner(modules): """ test finding the package owning a file """ - binary = shutil.which("ls") + binary = "/bin/ls" + if not os.path.exists(binary): + binary = "/usr/bin/ls" + if not os.path.exists(binary): + pytest.skip("Neither '/bin/ls' nor '/usr/bin/ls' are present on the system") + ret = modules.pkg.owner(binary) assert len(ret) != 0