Skip to content

Commit 60389a1

Browse files
committed
TST: Skip a test for pandas < 3.
1 parent 38facba commit 60389a1

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

tests/test_scale_internals.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import numpy.testing as npt
66
import pandas as pd
77
import pytest
8+
from packaging.version import Version
89

910
import plotnine as p9
1011
from plotnine import (
@@ -57,6 +58,8 @@
5758
)
5859
from plotnine.scales.scales import make_scale
5960

61+
PANDAS_LT_3 = Version(pd.__version__) < Version("3.0")
62+
6063

6164
# test palettes
6265
def test_discrete_color_palettes():
@@ -630,6 +633,7 @@ def test_missing_data_discrete_scale():
630633
assert p == "missing_data_discrete_scale"
631634

632635

636+
@pytest.mark.skipif(PANDAS_LT_3, reason="Fails on pandas<3")
633637
def test_missing_data_discrete_position_scale():
634638
data = pd.DataFrame({"a": [1, 2, 3], "b": ["a", "b", None]})
635639

0 commit comments

Comments
 (0)