test_unicode_handling() — langchain Function Reference
Architecture documentation for the test_unicode_handling() function in test_json.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 31153ad9_add0_4730_328c_e7734f0cca49["test_unicode_handling()"] 8edb1db9_86b9_7cd9_158b_8b5423c9a6dd["test_json.py"] 31153ad9_add0_4730_328c_e7734f0cca49 -->|defined in| 8edb1db9_86b9_7cd9_158b_8b5423c9a6dd style 31153ad9_add0_4730_328c_e7734f0cca49 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/core/tests/unit_tests/output_parsers/test_json.py lines 620–630
def test_unicode_handling() -> None:
"""Tests if the JsonOutputParser is able to process unicodes."""
class Sample(BaseModel):
title: str = Field(description="科学文章的标题")
parser = SimpleJsonOutputParser(pydantic_object=Sample)
format_instructions = parser.get_format_instructions()
assert "科学文章的标题" in format_instructions, (
"Unicode characters should not be escaped"
)
Domain
Subdomains
Source
Frequently Asked Questions
What does test_unicode_handling() do?
test_unicode_handling() is a function in the langchain codebase, defined in libs/core/tests/unit_tests/output_parsers/test_json.py.
Where is test_unicode_handling() defined?
test_unicode_handling() is defined in libs/core/tests/unit_tests/output_parsers/test_json.py at line 620.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free