forked from Mirror/pmbootstrap
test: parse: add test_deviceinfo (MR 2453)
Write some basic parser tests for deviceinfo. The parser is quite basic so there isn't much to test yet. Expecting this to gain features as we look at e.g. making the parser the "source of truth" for the deviceinfo format. Signed-off-by: Caleb Connolly <caleb@postmarketos.org>
This commit is contained in:
parent
511d490015
commit
b9354d3ccd
3 changed files with 217 additions and 0 deletions
|
@ -2,6 +2,7 @@ import os
|
|||
from pathlib import Path
|
||||
import pytest
|
||||
import shutil
|
||||
import tempfile
|
||||
|
||||
import pmb.core
|
||||
from pmb.core.context import get_context
|
||||
|
@ -165,3 +166,8 @@ def pmaports(pmb_args, monkeypatch):
|
|||
pmb.helpers.git.clone("pmaports")
|
||||
|
||||
assert pmb.helpers.run.user(["git", "checkout", "master"], working_dir=config.aports[0]) == 0
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def tmp_file(tmp_path):
|
||||
return Path(tempfile.mkstemp(dir=tmp_path)[1])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue