test_create_operation() — langchain Function Reference
Architecture documentation for the test_create_operation() function in test_anthropic_tools.py from the langchain codebase.
Entity Profile
Dependency Diagram
graph TD 504018cf_fdee_726a_8712_5f2a9d334ef2["test_create_operation()"] 6ec57bb9_6c88_435d_d3c5_ccf498cb814d["TestFileOperations"] 504018cf_fdee_726a_8712_5f2a9d334ef2 -->|defined in| 6ec57bb9_6c88_435d_d3c5_ccf498cb814d style 504018cf_fdee_726a_8712_5f2a9d334ef2 fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
libs/partners/anthropic/tests/unit_tests/middleware/test_anthropic_tools.py lines 132–145
def test_create_operation(self) -> None:
"""Test create command execution."""
middleware = StateClaudeTextEditorMiddleware()
state: AnthropicToolsState = {"messages": []}
args = {"command": "create", "path": "/test.txt", "file_text": "line1\nline2"}
result = middleware._handle_create(args, state, "test_id")
assert isinstance(result, Command)
assert result.update is not None
files = result.update.get("text_editor_files", {})
assert "/test.txt" in files
assert files["/test.txt"]["content"] == ["line1", "line2"]
Domain
Subdomains
Source
Frequently Asked Questions
What does test_create_operation() do?
test_create_operation() is a function in the langchain codebase, defined in libs/partners/anthropic/tests/unit_tests/middleware/test_anthropic_tools.py.
Where is test_create_operation() defined?
test_create_operation() is defined in libs/partners/anthropic/tests/unit_tests/middleware/test_anthropic_tools.py at line 132.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free