langchain[patch]: Fix flaky unit test (#21258)

Should sort the results of the import test since it depends on import order
pull/21256/head^2
Eugene Yurtsev 1 month ago committed by GitHub
parent 0989c48028
commit 66a1e3f083
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -64,15 +64,17 @@ def test_import_all_modules() -> None:
] ]
# This test will need to be updated if new serializable classes are added # This test will need to be updated if new serializable classes are added
# to community # to community
assert filtered_modules == [ assert sorted(filtered_modules) == sorted(
("langchain", "chat_models", "azure_openai", "AzureChatOpenAI"), [
("langchain", "chat_models", "bedrock", "BedrockChat"), ("langchain", "chat_models", "azure_openai", "AzureChatOpenAI"),
("langchain", "chat_models", "anthropic", "ChatAnthropic"), ("langchain", "chat_models", "bedrock", "BedrockChat"),
("langchain", "chat_models", "fireworks", "ChatFireworks"), ("langchain", "chat_models", "anthropic", "ChatAnthropic"),
("langchain", "chat_models", "google_palm", "ChatGooglePalm"), ("langchain", "chat_models", "fireworks", "ChatFireworks"),
("langchain", "chat_models", "openai", "ChatOpenAI"), ("langchain", "chat_models", "google_palm", "ChatGooglePalm"),
("langchain", "chat_models", "vertexai", "ChatVertexAI"), ("langchain", "chat_models", "openai", "ChatOpenAI"),
] ("langchain", "chat_models", "vertexai", "ChatVertexAI"),
]
)
def test_serializable_mapping() -> None: def test_serializable_mapping() -> None:

Loading…
Cancel
Save