mirror of
https://gitlab.com/kupfer/kupferbootstrap.git
synced 2025-02-23 05:35:44 -05:00
packages: add tests for flavour.py
This commit is contained in:
parent
dfb305b362
commit
b551c89a1c
1 changed files with 29 additions and 0 deletions
29
packages/test_flavour.py
Normal file
29
packages/test_flavour.py
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
from .flavour import Flavour, get_flavour, get_flavours
|
||||||
|
|
||||||
|
FLAVOUR_NAME = 'phosh'
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.fixture()
|
||||||
|
def flavour(name=FLAVOUR_NAME) -> Flavour:
|
||||||
|
return get_flavour(name)
|
||||||
|
|
||||||
|
|
||||||
|
def test_get_flavour(flavour: Flavour):
|
||||||
|
assert isinstance(flavour, Flavour)
|
||||||
|
assert flavour.name
|
||||||
|
assert flavour.pkgbuild
|
||||||
|
|
||||||
|
|
||||||
|
def test_parse_flavourinfo(flavour: Flavour):
|
||||||
|
info = flavour.parse_flavourinfo()
|
||||||
|
assert isinstance(info.rootfs_size, int)
|
||||||
|
# rootfs_size should not be zero
|
||||||
|
assert info.rootfs_size
|
||||||
|
|
||||||
|
|
||||||
|
def test_get_flavours():
|
||||||
|
flavours = get_flavours()
|
||||||
|
assert flavours
|
||||||
|
assert FLAVOUR_NAME in flavours
|
Loading…
Add table
Reference in a new issue