build(test_python_38.py): add testing for litellm cli import

This commit is contained in:
Krrish Dholakia 2024-03-23 10:42:19 -07:00
parent 1b24beb7c7
commit f0bee037ad

View file

@ -1,6 +1,7 @@
import sys, os, time
import traceback, asyncio
import pytest
import subprocess
sys.path.insert(
0, os.path.abspath("../..")
@ -16,3 +17,17 @@ def test_using_litellm():
pytest.fail(
f"Error occurred: {e}. Installing litellm on python3.8 failed please retry"
)
def test_litellm_proxy_server():
# Install the litellm[proxy] package
subprocess.run(["pip", "install", "litellm[proxy]"])
# Import the proxy_server module
try:
import litellm.proxy.proxy_server
except ImportError:
pytest.fail("Failed to import litellm.proxy_server")
# Assertion to satisfy the test, you can add other checks as needed
assert True