Home / Function/ test_removes_files_from_input() — anthropic-sdk-python Function Reference

test_removes_files_from_input() — anthropic-sdk-python Function Reference

Architecture documentation for the test_removes_files_from_input() function in test_extract_files.py from the anthropic-sdk-python codebase.

Entity Profile

Dependency Diagram

graph TD
  cc5cec67_6b57_570f_e6ee_4e11feca1376["test_removes_files_from_input()"]
  0c5e6779_0a2a_28fc_5287_7349e6c59ced["test_extract_files.py"]
  cc5cec67_6b57_570f_e6ee_4e11feca1376 -->|defined in| 0c5e6779_0a2a_28fc_5287_7349e6c59ced
  style cc5cec67_6b57_570f_e6ee_4e11feca1376 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_extract_files.py lines 11–26

def test_removes_files_from_input() -> None:
    query = {"foo": "bar"}
    assert extract_files(query, paths=[]) == []
    assert query == {"foo": "bar"}

    query2 = {"foo": b"Bar", "hello": "world"}
    assert extract_files(query2, paths=[["foo"]]) == [("foo", b"Bar")]
    assert query2 == {"hello": "world"}

    query3 = {"foo": {"foo": {"bar": b"Bar"}}, "hello": "world"}
    assert extract_files(query3, paths=[["foo", "foo", "bar"]]) == [("foo[foo][bar]", b"Bar")]
    assert query3 == {"foo": {"foo": {}}, "hello": "world"}

    query4 = {"foo": {"bar": b"Bar", "baz": "foo"}, "hello": "world"}
    assert extract_files(query4, paths=[["foo", "bar"]]) == [("foo[bar]", b"Bar")]
    assert query4 == {"hello": "world", "foo": {"baz": "foo"}}

Subdomains

Frequently Asked Questions

What does test_removes_files_from_input() do?
test_removes_files_from_input() is a function in the anthropic-sdk-python codebase, defined in tests/test_extract_files.py.
Where is test_removes_files_from_input() defined?
test_removes_files_from_input() is defined in tests/test_extract_files.py at line 11.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free