Skip to content

Commit 6847fa6

Browse files
committed
temporarily skip pandas 3 + pandas_pyarrow_constructor + px.sunburst() tests
1 parent 2b711de commit 6847fa6

File tree

1 file changed

+23
-3
lines changed

1 file changed

+23
-3
lines changed

tests/test_optional/test_px/test_px_functions.py

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1-
import plotly.express as px
2-
import plotly.graph_objects as go
3-
from numpy.testing import assert_array_equal
41
import narwhals.stable.v1 as nw
52
import numpy as np
3+
from numpy.testing import assert_array_equal
4+
from packaging.version import Version
5+
import pandas
6+
import plotly.express as px
7+
import plotly.graph_objects as go
68
from polars.exceptions import InvalidOperationError
79
import pytest
810

11+
from .conftest import pandas_pyarrow_constructor
12+
13+
14+
def _pandas_version_at_least(version: str) -> bool:
15+
return Version(pandas.__version__) >= Version(version)
16+
917

1018
def _compare_figures(go_trace, px_fig):
1119
"""Compare a figure created with a go trace and a figure created with
@@ -153,6 +161,9 @@ def test_sunburst_treemap_colorscales():
153161

154162

155163
def test_sunburst_treemap_with_path(constructor):
164+
if _pandas_version_at_least("3.0.0") and constructor == pandas_pyarrow_constructor:
165+
pytest.skip("known issue with pandas 3 + pandas_pyarrow_constructor + px.sunburst() (https://github.com/plotly/plotly.py/issues/5571)")
166+
156167
vendors = ["A", "B", "C", "D", "E", "F", "G", "H"]
157168
sectors = [
158169
"Tech",
@@ -249,6 +260,9 @@ def test_sunburst_treemap_with_path_and_hover(backend):
249260

250261

251262
def test_sunburst_treemap_with_path_color(constructor):
263+
if _pandas_version_at_least("3.0.0") and constructor == pandas_pyarrow_constructor:
264+
pytest.skip("known issue with pandas 3 + pandas_pyarrow_constructor + px.sunburst() (https://github.com/plotly/plotly.py/issues/5571)")
265+
252266
vendors = ["A", "B", "C", "D", "E", "F", "G", "H"]
253267
sectors = [
254268
"Tech",
@@ -327,6 +341,9 @@ def test_sunburst_treemap_with_path_color(constructor):
327341

328342

329343
def test_sunburst_treemap_column_parent(constructor):
344+
if _pandas_version_at_least("3.0.0") and constructor == pandas_pyarrow_constructor:
345+
pytest.skip("known issue with pandas 3 + pandas_pyarrow_constructor + px.sunburst() (https://github.com/plotly/plotly.py/issues/5571)")
346+
330347
vendors = ["A", "B", "C", "D", "E", "F", "G", "H"]
331348
sectors = [
332349
"Tech",
@@ -354,6 +371,9 @@ def test_sunburst_treemap_column_parent(constructor):
354371

355372

356373
def test_sunburst_treemap_with_path_non_rectangular(constructor):
374+
if _pandas_version_at_least("3.0.0") and constructor == pandas_pyarrow_constructor:
375+
pytest.skip("known issue with pandas 3 + pandas_pyarrow_constructor + px.sunburst() (https://github.com/plotly/plotly.py/issues/5571)")
376+
357377
vendors = ["A", "B", "C", "D", None, "E", "F", "G", "H", None]
358378
sectors = [
359379
"Tech",

0 commit comments

Comments
 (0)