MCPcopy Create free account
hub / github.com/anomalyco/opencode-sdk-python / test_datetime_custom_format

Function test_datetime_custom_format

tests/test_transform.py:251–255  ·  view source on GitHub ↗
(use_async: bool)

Source from the content-addressed store, hash-verified

249@parametrize
250@pytest.mark.asyncio
251async def test_datetime_custom_format(use_async: bool) -> None:
252 dt = parse_datetime("2022-01-15T06:34:23Z")
253
254 result = await transform(dt, Annotated[datetime, PropertyInfo(format="custom", format_template="%H")], use_async)
255 assert result == "06" # type: ignore[comparison-overlap]
256
257
258class DateDictWithRequiredAlias(TypedDict, total=False):

Callers

nothing calls this directly

Calls 3

PropertyInfoClass · 0.90
parse_datetimeFunction · 0.85
transformFunction · 0.70

Tested by

no test coverage detected