From f0bee037adf595b189c0282ced91047699494bd1 Mon Sep 17 00:00:00 2001 From: Krrish Dholakia Date: Sat, 23 Mar 2024 10:42:19 -0700 Subject: [PATCH] build(test_python_38.py): add testing for litellm cli import --- litellm/tests/test_python_38.py | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/litellm/tests/test_python_38.py b/litellm/tests/test_python_38.py index 077e65a3a1d..378b85b6417 100644 --- a/litellm/tests/test_python_38.py +++ b/litellm/tests/test_python_38.py @@ -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