mirror of
https://github.com/arcan1s/ahriman.git
synced 2025-07-22 10:19:57 +00:00
allow packages without package function
This commit is contained in:
@ -66,14 +66,14 @@ def test_from_io_empty(pkgbuild_ahriman: Pkgbuild, mocker: MockerFixture) -> Non
|
||||
|
||||
def test_packages(pkgbuild_ahriman: Pkgbuild) -> None:
|
||||
"""
|
||||
must correctly generate load package function
|
||||
must correctly load package function
|
||||
"""
|
||||
assert pkgbuild_ahriman.packages() == {pkgbuild_ahriman["pkgbase"]: Pkgbuild({})}
|
||||
|
||||
|
||||
def test_packages_multi(resource_path_root: Path) -> None:
|
||||
"""
|
||||
must correctly generate load list of package functions
|
||||
must correctly load list of package functions
|
||||
"""
|
||||
pkgbuild = Pkgbuild.from_file(resource_path_root / "models" / "package_gcc10_pkgbuild")
|
||||
packages = pkgbuild.packages()
|
||||
@ -83,6 +83,14 @@ def test_packages_multi(resource_path_root: Path) -> None:
|
||||
assert all("depends" in package for package in packages.values())
|
||||
|
||||
|
||||
def test_packages_empty(pkgbuild_ahriman: Pkgbuild) -> None:
|
||||
"""
|
||||
must correctly load packages without package functionn
|
||||
"""
|
||||
del pkgbuild_ahriman.fields["package()"]
|
||||
assert pkgbuild_ahriman.packages() == {pkgbuild_ahriman["pkgbase"]: Pkgbuild({})}
|
||||
|
||||
|
||||
def test_getitem(pkgbuild_ahriman: Pkgbuild) -> None:
|
||||
"""
|
||||
must return element by key
|
||||
|
Reference in New Issue
Block a user