(fig1)
| 72 | # from_json |
| 73 | # --------- |
| 74 | def test_from_json(fig1): |
| 75 | fig1_json = json.dumps(fig1, **opts) |
| 76 | fig1_loaded = pio.from_json(fig1_json) |
| 77 | |
| 78 | # Check return type |
| 79 | assert isinstance(fig1_loaded, go.Figure) |
| 80 | |
| 81 | # Check return json |
| 82 | assert pio.to_json(fig1_loaded) == pio.to_json(fig1.to_dict()) |
| 83 | |
| 84 | |
| 85 | @pytest.mark.parametrize( |