diff --git a/tests/test_litellm/test_lazy_imports.py b/tests/test_litellm/test_lazy_imports.py index 09d5e23e2e6..34d5f1d1e41 100644 --- a/tests/test_litellm/test_lazy_imports.py +++ b/tests/test_litellm/test_lazy_imports.py @@ -408,7 +408,8 @@ def test_star_import_exports_public_api(): code = ( "from litellm import *\n" "import litellm\n" - "missing = [n for n in litellm.__all__ if n not in dir()]\n" + "bound = globals()\n" + "missing = [n for n in litellm.__all__ if n not in bound]\n" "assert not missing, missing[:20]\n" "assert callable(completion) and callable(Router)\n" )