fix(tests): load the test settings only when running tests

Previous implementation causes false positives with the last version of LlamaIndex
This commit is contained in:
Iván Martínez
2024-01-09 12:03:16 +01:00
committed by GitHub
parent 0a89d76cc5
commit d3acd85fe3

View File

@@ -16,7 +16,7 @@ logger = logging.getLogger(__name__)
_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"]