test_base64_file_input() — anthropic-sdk-python Function Reference
Architecture documentation for the test_base64_file_input() function in test_transform.py from the anthropic-sdk-python codebase.
Entity Profile
Dependency Diagram
graph TD 3257f477_f597_27af_533d_88713f1f8b9e["test_base64_file_input()"] 6d065906_49ba_5188_2c4a_08d599bd18f8["test_transform.py"] 3257f477_f597_27af_533d_88713f1f8b9e -->|defined in| 6d065906_49ba_5188_2c4a_08d599bd18f8 5eb50e5f_8948_6af4_c03d_f10efd0687eb["transform()"] 3257f477_f597_27af_533d_88713f1f8b9e -->|calls| 5eb50e5f_8948_6af4_c03d_f10efd0687eb style 3257f477_f597_27af_533d_88713f1f8b9e fill:#6366f1,stroke:#818cf8,color:#fff
Relationship Graph
Source Code
tests/test_transform.py lines 419–434
async def test_base64_file_input(use_async: bool) -> None:
# strings are left as-is
assert await transform({"foo": "bar"}, TypedDictBase64Input, use_async) == {"foo": "bar"}
# pathlib.Path is automatically converted to base64
assert await transform({"foo": SAMPLE_FILE_PATH}, TypedDictBase64Input, use_async) == {
"foo": "SGVsbG8sIHdvcmxkIQo="
} # type: ignore[comparison-overlap]
# io instances are automatically converted to base64
assert await transform({"foo": io.StringIO("Hello, world!")}, TypedDictBase64Input, use_async) == {
"foo": "SGVsbG8sIHdvcmxkIQ=="
} # type: ignore[comparison-overlap]
assert await transform({"foo": io.BytesIO(b"Hello, world!")}, TypedDictBase64Input, use_async) == {
"foo": "SGVsbG8sIHdvcmxkIQ=="
} # type: ignore[comparison-overlap]
Domain
Subdomains
Defined In
Calls
Source
Frequently Asked Questions
What does test_base64_file_input() do?
test_base64_file_input() is a function in the anthropic-sdk-python codebase, defined in tests/test_transform.py.
Where is test_base64_file_input() defined?
test_base64_file_input() is defined in tests/test_transform.py at line 419.
What does test_base64_file_input() call?
test_base64_file_input() calls 1 function(s): transform.
Analyze Your Own Codebase
Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.
Try Supermodel Free