Skip to content

Commit 2e66fb0

Browse files
committed
add actual image generation step in test
1 parent bdf8f05 commit 2e66fb0

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/test_optional/test_kaleido/test_kaleido.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,13 @@ def test_defaults():
230230
assert pio._kaleido.scope.topojson == "path/to/topojson/files/"
231231
assert pio._kaleido.scope.plotlyjs == "https://cdn.plot.ly/plotly-3.0.0.js"
232232

233+
# Set topojson default back to None
234+
# (otherwise image generation will fail)
235+
pio.defaults.topojson = None
236+
# Generate image for real and make sure it's an SVG
237+
result = test_fig.to_image(format="svg", validate=False)
238+
assert result.startswith(b"<svg")
239+
233240
finally:
234241
# Reset defaults to original values and check that they are restored
235242
pio.defaults.default_format = "png"

0 commit comments

Comments
 (0)