tests: Show warning when app not available

Signed-off-by: James Valleroy <jvalleroy@mailbox.org>
Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
James Valleroy authored and Sunil Mohan Adapa committed 2021-09-18 17:08:39 -07:00
1 parent e31053eb92
commit 0440b7ba52
1 file changed
+3
+3
View File
@@ -10,6 +10,7 @@ import pathlib
import subprocess
import tempfile
import time
import warnings
from contextlib import contextmanager
import pytest
@@ -345,6 +346,8 @@ def install(browser, app_name):
browser.visit(browser.url)
else:
# This app is not available in this distribution
warnings.warn(
f'App {app_name} is not available in distribution')
pytest.skip('App not available in distribution')
else:
install_button.click()