mirror of
https://github.com/hwchase17/langchain
synced 2024-11-06 03:20:49 +00:00
16 lines
477 B
Python
16 lines
477 B
Python
|
import glob
|
||
|
import importlib
|
||
|
|
||
|
|
||
|
def test_importable_all() -> None:
|
||
|
for path in glob.glob("../community/langchain_community/*"):
|
||
|
relative_path = path.split("/")[-1]
|
||
|
if relative_path.endswith(".typed"):
|
||
|
continue
|
||
|
module_name = relative_path.split(".")[0]
|
||
|
|
||
|
module = importlib.import_module("langchain_community." + module_name)
|
||
|
all_ = getattr(module, "__all__", [])
|
||
|
for cls_ in all_:
|
||
|
getattr(module, cls_)
|