MCPcopy
hub / github.com/Textualize/rich / test_print_json_data_with_default

Function test_print_json_data_with_default

tests/test_json.py:5–8  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3
4
5def test_print_json_data_with_default():
6 date = datetime.date(2021, 1, 1)
7 json = JSON.from_data({"date": date}, default=lambda d: d.isoformat())
8 assert str(json.text) == '{\n "date": "2021-01-01"\n}'

Callers

nothing calls this directly

Calls 1

from_dataMethod · 0.80

Tested by

no test coverage detected