Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/plotly/plotly.py
/ test_to_json_validate
Function
test_to_json_validate
tests/test_io/test_to_from_json.py:51–56 ·
view source on GitHub ↗
(fig1)
Source
from the content-addressed store, hash-verified
49
50
51
def
test_to_json_validate(fig1):
52
dict1 = fig1.to_dict()
53
dict1[
"layout"
][
"bogus"
] = 37
54
55
with
pytest.raises(ValueError):
56
pio.to_json(dict1)
57
58
59
def
test_to_json_validate_false(fig1):
Callers
nothing calls this directly
Calls
2
to_dict
Method · 0.80
to_json
Method · 0.45
Tested by
no test coverage detected