From 0c59dbb0e47739a27794d29be2cf505c099b6741 Mon Sep 17 00:00:00 2001 From: Veiko Aasa Date: Mon, 22 Jun 2020 23:18:20 +0300 Subject: [PATCH] functional-tests: Skip tests if app is not available in distribution Signed-off-by: Veiko Aasa Reviewed-by: Sunil Mohan Adapa --- plinth/tests/functional/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plinth/tests/functional/__init__.py b/plinth/tests/functional/__init__.py index 52379847e..133b09db8 100644 --- a/plinth/tests/functional/__init__.py +++ b/plinth/tests/functional/__init__.py @@ -11,6 +11,7 @@ import tempfile import time from contextlib import contextmanager +import pytest import requests from selenium.common.exceptions import (WebDriverException, StaleElementReferenceException) @@ -305,7 +306,7 @@ def install(browser, app_name): browser.visit(browser.url) else: # This app is not available in this distribution - raise Exception('App not available in distribution') + pytest.skip('App not available in distribution') else: install_button.click() else: