Skip to content

Commit 2a73de1

Browse files
committed
added minimal test for px
1 parent 87c3bc1 commit 2a73de1

File tree

1 file changed

+13
-0
lines changed
  • packages/python/plotly/plotly/tests/test_core/test_px

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import plotly.express as px
2+
import numpy as np
3+
4+
def test_scatter():
5+
iris = px.data.iris()
6+
fig = px.scatter(iris, x="sepal_width", y="sepal_length")
7+
assert fig.data[0].type == 'scatter'
8+
assert np.all(fig.data[0].x == iris.sepal_width)
9+
assert np.all(fig.data[0].y == iris.sepal_length)
10+
# test defaults
11+
assert fig.data[0].mode == 'markers'
12+
13+

0 commit comments

Comments
 (0)