Testutil: add DNF5 helper function for depsolving

This will be used for testing the SBOM implementation with DNF5.

Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
Tomáš Hozza 2024-11-07 13:27:16 +01:00 committed by Simon de Vlieger
parent 3bf6ca399f
commit 7993b78e7c
2 changed files with 61 additions and 0 deletions

View file

@ -0,0 +1,11 @@
import os.path
import pytest
testutil_dnf5 = pytest.importorskip("osbuild.testutil.dnf5")
def test_depsolve_pkgset():
_, pkgset = testutil_dnf5.depsolve_pkgset([os.path.abspath("./test/data/testrepos/baseos")], ["bash"])
assert len(pkgset) == 15
assert "bash" in [pkg.get_name() for pkg in pkgset]