MCPcopy Index your code
hub / github.com/plotly/plotly.py / isoformat_test

Function isoformat_test

tests/test_io/test_to_from_plotly_json.py:34–40  ·  view source on GitHub ↗
(dt_value)

Source from the content-addressed store, hash-verified

32
33
34def isoformat_test(dt_value):
35 if isinstance(dt_value, np.datetime64):
36 return str(dt_value)
37 elif isinstance(dt_value, datetime.datetime):
38 return dt_value.isoformat()
39 else:
40 raise ValueError("Unsupported date type: {}".format(type(dt_value)))
41
42
43def build_test_dict(value):

Callers 1

test_datetimeFunction · 0.85

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected