1
0
Fork 1
mirror of https://gitlab.postmarketos.org/postmarketOS/pmbootstrap.git synced 2025-07-14 20:09:49 +03:00
pmbootstrap/test/test_frontend.py
Oliver Smith f21c216a26
Cosmetic: use SPDX license header (!1877)
While at it, also remove unnecessary "#!/usr/bin/env python3" in files
that only get imported, and adjust other empty/comment lines in the
beginnings of the files for consistency.

This makes files easier to read, and makes the pmbootstrap codebase more
consistent with the build.postmarketos.org codebase.
2020-02-24 03:11:10 +03:00

19 lines
521 B
Python

# Copyright 2020 Oliver Smith
# SPDX-License-Identifier: GPL-3.0-or-later
import sys
import pytest
import pmb_test # noqa
import pmb.config
import pmb.parse
import pmb.helpers.frontend
import pmb.helpers.logging
def test_build_src_invalid_path():
sys.argv = ["pmbootstrap.py", "build", "--src=/invalidpath", "hello-world"]
args = pmb.parse.arguments()
with pytest.raises(RuntimeError) as e:
pmb.helpers.frontend.build(args)
assert str(e.value).startswith("Invalid path specified for --src:")