MCPcopy 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
51def 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
59def test_to_json_validate_false(fig1):

Callers

nothing calls this directly

Calls 2

to_dictMethod · 0.80
to_jsonMethod · 0.45

Tested by

no test coverage detected