From d3acd85fe34030f8cfd7daf50b30c534087bdf2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Mart=C3=ADnez?= Date: Tue, 9 Jan 2024 12:03:16 +0100 Subject: [PATCH] fix(tests): load the test settings only when running tests Previous implementation causes false positives with the last version of LlamaIndex --- private_gpt/settings/settings_loader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/private_gpt/settings/settings_loader.py b/private_gpt/settings/settings_loader.py index b4052db26..2784cdfcf 100644 --- a/private_gpt/settings/settings_loader.py +++ b/private_gpt/settings/settings_loader.py @@ -16,7 +16,7 @@ _settings_folder = os.environ.get("PGPT_SETTINGS_FOLDER", PROJECT_ROOT_PATH) # if running in unittest, use the test profile -_test_profile = ["test"] if "unittest" in sys.modules else [] +_test_profile = ["test"] if "tests.fixtures" in sys.modules else [] active_profiles: list[str] = unique_list( ["default"]