From 001c3dadb0945934d99659f2679daf24f52f662b Mon Sep 17 00:00:00 2001 From: Kai-Uwe Hermann Date: Thu, 8 Feb 2024 19:53:48 +0100 Subject: [PATCH] Do not set pytest.everest_configs if directory doesn't exist Signed-off-by: Kai-Uwe Hermann --- tests/conftest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 92b51143c..3daa00105 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -13,6 +13,8 @@ def pytest_addoption(parser): def pytest_configure(config): everest_prefix = config.getoption('--everest-prefix') everest_config_path = Path(everest_prefix) / 'etc/everest' + if not everest_config_path.exists(): + return everest_configs = [path for path in everest_config_path.iterdir( ) if path.name.startswith('config-') and path.name.endswith('.yaml')] pytest.everest_configs = {}