Skip to content

Commit ede74f0

Browse files
committed
temporarily skip pandas 3 + pandas_pyarrow_constructor + px.sunburst() tests
1 parent e6f0102 commit ede74f0

File tree

1 file changed

+31
-3
lines changed

1 file changed

+31
-3
lines changed

tests/test_optional/test_px/test_px_functions.py

Lines changed: 31 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,11 @@ 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(
166+
"known issue with pandas 3 + pandas_pyarrow_constructor + px.sunburst() (https://github.com/plotly/plotly.py/issues/5571)"
167+
)
168+
156169
vendors = ["A", "B", "C", "D", "E", "F", "G", "H"]
157170
sectors = [
158171
"Tech",
@@ -249,6 +262,11 @@ def test_sunburst_treemap_with_path_and_hover(backend):
249262

250263

251264
def test_sunburst_treemap_with_path_color(constructor):
265+
if _pandas_version_at_least("3.0.0") and constructor == pandas_pyarrow_constructor:
266+
pytest.skip(
267+
"known issue with pandas 3 + pandas_pyarrow_constructor + px.sunburst() (https://github.com/plotly/plotly.py/issues/5571)"
268+
)
269+
252270
vendors = ["A", "B", "C", "D", "E", "F", "G", "H"]
253271
sectors = [
254272
"Tech",
@@ -327,6 +345,11 @@ def test_sunburst_treemap_with_path_color(constructor):
327345

328346

329347
def test_sunburst_treemap_column_parent(constructor):
348+
if _pandas_version_at_least("3.0.0") and constructor == pandas_pyarrow_constructor:
349+
pytest.skip(
350+
"known issue with pandas 3 + pandas_pyarrow_constructor + px.sunburst() (https://github.com/plotly/plotly.py/issues/5571)"
351+
)
352+
330353
vendors = ["A", "B", "C", "D", "E", "F", "G", "H"]
331354
sectors = [
332355
"Tech",
@@ -354,6 +377,11 @@ def test_sunburst_treemap_column_parent(constructor):
354377

355378

356379
def test_sunburst_treemap_with_path_non_rectangular(constructor):
380+
if _pandas_version_at_least("3.0.0") and constructor == pandas_pyarrow_constructor:
381+
pytest.skip(
382+
"known issue with pandas 3 + pandas_pyarrow_constructor + px.sunburst() (https://github.com/plotly/plotly.py/issues/5571)"
383+
)
384+
357385
vendors = ["A", "B", "C", "D", None, "E", "F", "G", "H", None]
358386
sectors = [
359387
"Tech",

0 commit comments

Comments
 (0)