From 22ca54ac47593937f2911a66d4777e2f8d42f6ee Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Mon, 6 Jun 2022 11:35:36 -0700 Subject: [PATCH] TST: xfail unit test on min build --- pandas/compat/numpy/__init__.py | 1 + pandas/tests/indexing/test_iloc.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/pandas/compat/numpy/__init__.py b/pandas/compat/numpy/__init__.py index f9c43592d5f62..803f495b311b9 100644 --- a/pandas/compat/numpy/__init__.py +++ b/pandas/compat/numpy/__init__.py @@ -11,6 +11,7 @@ np_version_gte1p22 = _nlv >= Version("1.22") is_numpy_dev = _nlv.dev is not None _min_numpy_ver = "1.19.5" +is_numpy_min = _nlv == Version(_min_numpy_ver) if is_numpy_dev or not np_version_under1p22: np_percentile_argname = "method" diff --git a/pandas/tests/indexing/test_iloc.py b/pandas/tests/indexing/test_iloc.py index 539b56667ee07..44cdc320148e1 100644 --- a/pandas/tests/indexing/test_iloc.py +++ b/pandas/tests/indexing/test_iloc.py @@ -10,6 +10,7 @@ import numpy as np import pytest +from pandas.compat.numpy import is_numpy_min import pandas.util._test_decorators as td from pandas import ( @@ -1198,6 +1199,7 @@ def test_iloc_getitem_int_single_ea_block_view(self): arr[2] = arr[-1] assert ser[0] == arr[-1] + @pytest.mark.xfail(is_numpy_min, reason="Column A gets coerced to integer type") def test_iloc_setitem_multicolumn_to_datetime(self, using_array_manager): # GH#20511