Skip to content

Commit 43bb844

Browse files
committed
Update test_conversation_logging_server.py
1 parent b6f37b7 commit 43bb844

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/test_conversation_logging_server.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@
1515
from pathlib import Path
1616
from openai import OpenAI
1717

18-
# Add parent directory to path for imports
19-
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
18+
# Add parent directory and tests directory to path for imports
19+
_tests_dir = os.path.dirname(os.path.abspath(__file__))
20+
_project_dir = os.path.dirname(_tests_dir)
21+
if _tests_dir not in sys.path:
22+
sys.path.insert(0, _tests_dir)
23+
if _project_dir not in sys.path:
24+
sys.path.insert(0, _project_dir)
2025

2126
from test_utils import TEST_MODEL, setup_test_env, start_test_server, stop_test_server
2227

0 commit comments

Comments
 (0)