Skip to content

Commit f367af2

Browse files
committed
Add tests for dictionary-style plotly.Figure
1 parent ac36682 commit f367af2

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/py/tests/test_calc_fig.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,16 @@ async def test_calc_fig():
1717
with warnings.catch_warnings():
1818
warnings.filterwarnings("ignore", category=DeprecationWarning)
1919
fig = px.line(x=[1, 2, 3, 4], y=[1, 2, 3, 4])
20+
2021
img = await kaleido.calc_fig(fig)
2122
assert img
23+
2224
img = kaleido.calc_fig_sync(fig)
2325
assert img
26+
27+
img = kaleido.calc_fig_sync(fig.to_dict())
28+
assert img
29+
2430
with pytest.raises(TypeError):
2531
# can't accept iterables
2632
img = kaleido.calc_fig_sync([fig, fig])

0 commit comments

Comments
 (0)