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

test_datetime_parsing() — anthropic-sdk-python Function Reference

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

Entity Profile

Dependency Diagram

graph TD
  8545cab3_5e79_b3f8_4067_90c567830a5d["test_datetime_parsing()"]
  59262a3f_6d06_383c_8999_fd1ad8974c65["test_datetime_parse.py"]
  8545cab3_5e79_b3f8_4067_90c567830a5d -->|defined in| 59262a3f_6d06_383c_8999_fd1ad8974c65
  style 8545cab3_5e79_b3f8_4067_90c567830a5d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

tests/test_utils/test_datetime_parse.py lines 105–110

def test_datetime_parsing(value: Union[str, bytes, int, float], result: Union[datetime, Type[Exception]]) -> None:
    if type(result) == type and issubclass(result, Exception):  # pyright: ignore[reportUnnecessaryIsInstance]
        with pytest.raises(result):
            parse_datetime(value)
    else:
        assert parse_datetime(value) == result

Subdomains

Frequently Asked Questions

What does test_datetime_parsing() do?
test_datetime_parsing() is a function in the anthropic-sdk-python codebase, defined in tests/test_utils/test_datetime_parse.py.
Where is test_datetime_parsing() defined?
test_datetime_parsing() is defined in tests/test_utils/test_datetime_parse.py at line 105.

Analyze Your Own Codebase

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

Try Supermodel Free