Skip to content

Commit 01d1453

Browse files
committed
move pytest mark into if statement
1 parent 2b694bf commit 01d1453

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

pandas/tests/extension/test_arrow.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,16 +1027,15 @@ def _get_arith_xfail_marker(self, opname, pa_dtype):
10271027
return mark
10281028

10291029
def test_round(self, data, request):
1030-
mark = pytest.mark.xfail(
1031-
# raises=pa.ArrowInvalid,
1032-
reason="ArrowArray.round converts dtype to double",
1033-
)
1034-
if (
1030+
mark = None
1031+
if not (
10351032
pa.types.is_float32(data.dtype.pyarrow_dtype)
10361033
or pa.types.is_float64(data.dtype.pyarrow_dtype)
10371034
or pa.types.is_decimal(data.dtype.pyarrow_dtype)
10381035
):
1039-
mark = None
1036+
pytest.mark.xfail(
1037+
reason="ArrowArray.round converts dtype to double",
1038+
)
10401039
if mark is not None:
10411040
request.node.add_marker(mark)
10421041
super().test_round(data)

0 commit comments

Comments
 (0)