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

test_array_brackets() — anthropic-sdk-python Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  0a05383d_24a3_8ea8_33be_0e7cded4711e["test_array_brackets()"]
  f0b34a63_809b_7308_2411_fc88725d50fa["test_qs.py"]
  0a05383d_24a3_8ea8_33be_0e7cded4711e -->|defined in| f0b34a63_809b_7308_2411_fc88725d50fa
  style 0a05383d_24a3_8ea8_33be_0e7cded4711e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_qs.py lines 65–73

def test_array_brackets(method: str) -> None:
    if method == "class":
        serialise = Querystring(array_format="brackets").stringify
    else:
        serialise = partial(stringify, array_format="brackets")

    assert unquote(serialise({"in": ["foo", "bar"]})) == "in[]=foo&in[]=bar"
    assert unquote(serialise({"a": {"b": [True, False]}})) == "a[b][]=true&a[b][]=false"
    assert unquote(serialise({"a": {"b": [True, False, None, True]}})) == "a[b][]=true&a[b][]=false&a[b][]=true"

Subdomains

Defined In

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free