test: test_questions_ui_extras: add tests for UI extras (!1911)

Ensure that it does not fail with the "none" UI (it does at the moment).
This commit is contained in:
Minecrell 2020-04-11 20:28:17 +02:00
parent 6731d02c4b
commit 87f81de052
No known key found for this signature in database
GPG key ID: 5AE7F5513E0885CB
2 changed files with 16 additions and 0 deletions

View file

@ -223,6 +223,17 @@ def test_questions_ui(args, monkeypatch):
assert pmb.config.init.ask_for_ui(args) == "weston" assert pmb.config.init.ask_for_ui(args) == "weston"
def test_questions_ui_extras(args, monkeypatch):
args.aports = pmb_test.const.testdata + "/init_questions_device/aports"
assert not pmb.config.init.ask_for_ui_extras(args, "none")
fake_answers(monkeypatch, ["n"])
assert not pmb.config.init.ask_for_ui_extras(args, "weston")
fake_answers(monkeypatch, ["y"])
assert pmb.config.init.ask_for_ui_extras(args, "weston")
def test_questions_work_path(args, monkeypatch, tmpdir): def test_questions_work_path(args, monkeypatch, tmpdir):
# Existing paths (triggering various errors) # Existing paths (triggering various errors)
func = pmb.config.init.ask_for_work_path func = pmb.config.init.ask_for_work_path

View file

@ -5,7 +5,12 @@ pkgdesc="(Wayland) Reference compositor (demo, not a phone interface)"
url="https://postmarketos.org" url="https://postmarketos.org"
arch="noarch" arch="noarch"
license="GPL-3.0-or-later" license="GPL-3.0-or-later"
subpackages="$pkgname-extras"
package() { package() {
mkdir "$pkgdir" mkdir "$pkgdir"
} }
extras() {
pkgdesc="Super cool extras you will definitely (not?) need"
}