[Bug]: can't run tests with pytest
from repo root
#4362
Replies: 2 comments 4 replies
-
@jamesbraza what needs to be changed here?
works
works |
Beta Was this translation helpful? Give feedback.
-
So check this: git clone [email protected]:BerriAI/litellm.git
cd litellm
python -m venv venv && source venv/bin/activate
pip install poetry
poetry install --with dev
pytest tests # Fails with ImportError: cannot import name 'Router' from 'litellm' (unknown location)
cd tests
pytest # Fails with ModuleNotFoundError: No module named 'openai.types.beta.threads.message_content'
cd ../litellm/tests
pytest # Fails with ModuleNotFoundError: No module named 'openai.types.beta.threads.message_content'
pytest . # Fails with ModuleNotFoundError: No module named 'fastapi', 'opentelemetry', 'backoff' I am more just sharing that LiteLLM is somewhat sensitive to starting directory because If one sets things up nicely (e.g. specifying One other issue is that Also, feel free to close this out. I am more just pointing out the "getting started" developing has opportunities for improvement |
Beta Was this translation helpful? Give feedback.
-
What happened?
This should work:
Second to last line, I get the below error:
Last line, I get the below error:
Can we fix the Poetry -->
pytest
workflowRelevant log output
No response
Twitter / LinkedIn details
No response
Beta Was this translation helpful? Give feedback.
All reactions