Skip to content

Commit a376c6d

Browse files
smarter x or y behaviour
1 parent ea14fc9 commit a376c6d

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

packages/python/plotly/plotly/tests/test_core/test_px/test_px_wide.py

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -21,16 +21,15 @@ def test_wide_mode_external():
2121
assert fig.layout.xaxis.title.text == "index"
2222
assert fig.layout.yaxis.title.text == "_value_"
2323
assert fig.layout.legend.title.text == "_column_"
24-
if px_fn in [px.area, px.bar]:
25-
fig = px_fn(df, orientation="h")
26-
assert len(fig.data) == 3
27-
assert list(fig.data[0].y) == [11, 12, 13]
28-
assert list(fig.data[0].x) == [1, 2, 3]
29-
assert list(fig.data[1].y) == [11, 12, 13]
30-
assert list(fig.data[1].x) == [4, 5, 6]
31-
assert fig.layout.yaxis.title.text == "index"
32-
assert fig.layout.xaxis.title.text == "_value_"
33-
assert fig.layout.legend.title.text == "_column_"
24+
fig = px_fn(df, orientation="h")
25+
assert len(fig.data) == 3
26+
assert list(fig.data[0].y) == [11, 12, 13]
27+
assert list(fig.data[0].x) == [1, 2, 3]
28+
assert list(fig.data[1].y) == [11, 12, 13]
29+
assert list(fig.data[1].x) == [4, 5, 6]
30+
assert fig.layout.yaxis.title.text == "index"
31+
assert fig.layout.xaxis.title.text == "_value_"
32+
assert fig.layout.legend.title.text == "_column_"
3433
for px_fn in [px.violin, px.box, px.strip]:
3534
fig = px_fn(df)
3635
assert len(fig.data) == 1

0 commit comments

Comments
 (0)