diff --git a/integration-tests/conftest.py b/integration-tests/conftest.py index ee0ebbd..82dd70e 100644 --- a/integration-tests/conftest.py +++ b/integration-tests/conftest.py @@ -4,12 +4,14 @@ import os from pytest import fixture -from tljh.config import CONFIG_FILE, reload_component @fixture def preserve_config(request): """Fixture to save and restore config around tests""" + # Import TLJH only when needed. This lets us run tests in places + # where TLJH is not installed - particularly, the 'distro check' test. + from tljh.config import CONFIG_FILE, reload_component if os.path.exists(CONFIG_FILE): with open(CONFIG_FILE) as f: save_config = f.read()