testutil: add helper function for depsolving pkgset with DNF4
This will be useful for testing SBOM implementations. Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
796f1d6fa1
commit
67c7d63983
2 changed files with 47 additions and 0 deletions
11
test/mod/test_testutil_dnf4.py
Normal file
11
test/mod/test_testutil_dnf4.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import os.path
|
||||
|
||||
import pytest
|
||||
|
||||
testutil_dnf4 = pytest.importorskip("osbuild.testutil.dnf4")
|
||||
|
||||
|
||||
def test_depsolve_pkgset():
|
||||
pkgset = testutil_dnf4.depsolve_pkgset([os.path.abspath("./test/data/testrepos/baseos")], ["bash"])
|
||||
assert len(pkgset) == 15
|
||||
assert "bash" in [pkg.name for pkg in pkgset]
|
||||
Loading…
Add table
Add a link
Reference in a new issue