pmbootstrap-meow/pmb/config/test_config_serde.py
Newbyte 871a3128d8
docs, pmb: Add missing copyright headers (MR 2516)
I tried my best to get the right author based on git commit history, but
in the case of code being moved from one file to make another I might
have gotten something wrong.
2025-01-02 16:45:03 +01:00

28 lines
960 B
Python

# Copyright 2024 Caleb Connolly
# SPDX-License-Identifier: GPL-3.0-or-later
import pmb.config
from pmb.core.config import SystemdConfig
"""Test the config file serialization and deserialization."""
def test_load(config_file):
config = pmb.config.load(config_file)
assert config.build_default_device_arch
assert config.ccache_size == "5G"
assert config.device == "qemu-amd64"
assert config.extra_packages == "neofetch,neovim,reboot-mode"
assert config.hostname == "qemu-amd64"
assert not config.is_default_channel
assert config.jobs == 8
assert config.kernel == "edge"
assert config.locale == "C.UTF-8"
assert config.ssh_keys
assert config.sudo_timer
assert config.systemd == SystemdConfig.ALWAYS
assert config.timezone == "Europe/Berlin"
assert config.ui == "gnome"
assert config.providers == {}
assert config.mirrors["pmaports"] is not None
assert ".pytest_tmp" in config.work.parts