test_format_instructions_preserves_language() — langchain Function Reference
Architecture documentation for the test_format_instructions_preserves_language() function in test_pydantic_parser.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 99550c0a_67ca_e455_61c1_1fb8db99113a["test_format_instructions_preserves_language()"] 70078932_b952_16ac_83c5_c9026d556e63["test_pydantic_parser.py"] 99550c0a_67ca_e455_61c1_1fb8db99113a -->|defined in| 70078932_b952_16ac_83c5_c9026d556e63 style 99550c0a_67ca_e455_61c1_1fb8db99113a fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/output_parsers/test_pydantic_parser.py lines 199–215
def test_format_instructions_preserves_language() -> None:
"""Test format instructions does not attempt to encode into ascii."""
description = (
"你好, こんにちは, नमस्ते, Bonjour, Hola, "
"Olá, 안녕하세요, Jambo, Merhaba, Γειά σου" # noqa: RUF001
)
class Foo(BaseModel):
hello: str = Field(
description=(
"你好, こんにちは, नमस्ते, Bonjour, Hola, "
"Olá, 안녕하세요, Jambo, Merhaba, Γειά σου" # noqa: RUF001
)
)
parser = PydanticOutputParser[Foo](pydantic_object=Foo)
assert description in parser.get_format_instructions()
Domain
Subdomains
Source
Frequently Asked Questions
What does test_format_instructions_preserves_language() do?
test_format_instructions_preserves_language() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/output_parsers/test_pydantic_parser.py.
Where is test_format_instructions_preserves_language() defined?
test_format_instructions_preserves_language() is defined in libs/core/tests/unit_tests/output_parsers/test_pydantic_parser.py at line 199.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free