Skip to content

Commit 7ee79ef

Browse files
committed
added pytest skips if no pyarrow module
1 parent 94893f0 commit 7ee79ef

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

pandas/tests/frame/methods/test_rank.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
Infinity,
1111
NegInfinity,
1212
)
13+
import pandas.util._test_decorators as td
1314

1415
from pandas import (
1516
DataFrame,
@@ -504,10 +505,20 @@ def test_rank_string_dtype(self, string_dtype_no_object):
504505
[
505506
("average", "UInt32", "Float64"),
506507
("average", "Float32", "Float64"),
507-
("average", "int32[pyarrow]", "double[pyarrow]"),
508+
pytest.param(
509+
"average",
510+
"int32[pyarrow]",
511+
"double[pyarrow]",
512+
marks=td.skip_if_no("pyarrow"),
513+
),
508514
("min", "Int32", "Float64"),
509515
("min", "Float32", "Float64"),
510-
("min", "int32[pyarrow]", "double[pyarrow]"),
516+
pytest.param(
517+
"min",
518+
"int32[pyarrow]",
519+
"double[pyarrow]",
520+
marks=td.skip_if_no("pyarrow"),
521+
),
511522
],
512523
)
513524
def test_rank_extension_array_dtype(self, method, og_dtype, expected_dtype):
@@ -520,6 +531,7 @@ def test_rank_extension_array_dtype(self, method, og_dtype, expected_dtype):
520531
tm.assert_frame_equal(result, expected)
521532

522533
def test_rank_mixed_extension_array_dtype(self):
534+
pytest.importorskip("pyarrow")
523535
result = DataFrame(
524536
{
525537
"base": Series([4, 5, 6]),

0 commit comments

Comments
 (0)