From f25e2706d2817ba02dae677ae8ab069ec117afff Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Sat, 1 Apr 2023 19:39:52 +0530 Subject: [PATCH] tests: Don't error during collection if selenium is not installed This fixes the current pipeline failures. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- conftest.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/conftest.py b/conftest.py index 3ba2576e8..333e66fa7 100644 --- a/conftest.py +++ b/conftest.py @@ -13,15 +13,16 @@ import pytest try: importlib.import_module('splinter') - _splinter_available = True + importlib.import_module('selenium') + _functional_libs_available = True except ImportError: - _splinter_available = False + _functional_libs_available = False def pytest_ignore_collect(path, config): """Ignore functional tests when splinter is not available.""" if path.basename == 'test_functional.py': - return not _splinter_available + return not _functional_libs_available def pytest_addoption(parser):