mirror of
https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git
synced 2025-07-13 11:29:46 +03:00
test: Test pmb.parse.arch.machine_type_to_alpine (MR 2282)
This commit is contained in:
parent
ba2ff0ea70
commit
b9858fb9cb
1 changed files with 15 additions and 0 deletions
15
test/test_parse_arch.py
Normal file
15
test/test_parse_arch.py
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# Copyright 2024 Stefan "Newbyte" Hansson
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
import pytest
|
||||||
|
|
||||||
|
import pmb.parse.arch
|
||||||
|
|
||||||
|
|
||||||
|
def test_machine_type_to_alpine() -> None:
|
||||||
|
fake_machine_type = "not-a-machine-type"
|
||||||
|
|
||||||
|
with pytest.raises(ValueError) as e:
|
||||||
|
pmb.parse.arch.machine_type_to_alpine(fake_machine_type)
|
||||||
|
assert e == f"Can not map machine type {fake_machine_type} to the right Alpine Linux architecture"
|
||||||
|
|
||||||
|
assert pmb.parse.arch.machine_type_to_alpine("armv7l") == "armv7"
|
Loading…
Add table
Add a link
Reference in a new issue