test: use __file__-relative sys.path for stable test imports

Address Greptile review — resolve sys.path relative to the test file
location instead of the process working directory.
This commit is contained in:
michelligabriele 2026-03-16 21:07:07 +01:00
parent 23b69eea62
commit b0c317e6d0

View file

@ -12,7 +12,7 @@ import sys
import pytest
from unittest.mock import MagicMock, patch
sys.path.insert(0, os.path.abspath("../../.."))
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), "../../..")))
from litellm.proxy.utils import (
_check_and_merge_model_level_guardrails,