You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/libs/cli/tests/unit_tests/migrate/cli_runner/cases/imports.py

33 lines
807 B
Python

from tests.unit_tests.migrate.cli_runner.case import Case
from tests.unit_tests.migrate.cli_runner.file import File
cases = [
Case(
name="Imports",
source=File(
"app.py",
content=[
"from langchain_community.chat_models import ChatOpenAI",
"",
"",
"class foo:",
" a: int",
"",
"chain = ChatOpenAI()",
],
),
expected=File(
"app.py",
content=[
"from langchain_openai import ChatOpenAI",
"",
"",
"class foo:",
" a: int",
"",
"chain = ChatOpenAI()",
],
),
),
]