From d4f61aca9a6d7c21fac13908ed55cf98b6156332 Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Fri, 25 Feb 2022 10:01:18 -0800 Subject: [PATCH 1/2] CI/TST: Fix xfail(strict=False) condition --- pandas/tests/indexes/test_setops.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/pandas/tests/indexes/test_setops.py b/pandas/tests/indexes/test_setops.py index 8502c43feeab5..964bee57698a6 100644 --- a/pandas/tests/indexes/test_setops.py +++ b/pandas/tests/indexes/test_setops.py @@ -50,13 +50,11 @@ def test_union_different_types(index_flat, index_flat2, request): if ( not idx1.is_unique and not idx2.is_unique - and not idx2.is_monotonic_decreasing and idx1.dtype.kind == "i" and idx2.dtype.kind == "b" ) or ( not idx2.is_unique and not idx1.is_unique - and not idx1.is_monotonic_decreasing and idx2.dtype.kind == "i" and idx1.dtype.kind == "b" ): From 0218260dd5db5948d7edb97f988c1e011086a03b Mon Sep 17 00:00:00 2001 From: Matthew Roeschke Date: Fri, 25 Feb 2022 11:51:32 -0800 Subject: [PATCH 2/2] add comment --- pandas/tests/indexes/test_setops.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pandas/tests/indexes/test_setops.py b/pandas/tests/indexes/test_setops.py index 964bee57698a6..f38a6c89e1bcb 100644 --- a/pandas/tests/indexes/test_setops.py +++ b/pandas/tests/indexes/test_setops.py @@ -58,6 +58,12 @@ def test_union_different_types(index_flat, index_flat2, request): and idx2.dtype.kind == "i" and idx1.dtype.kind == "b" ): + # Each condition had idx[1|2].is_monotonic_decreasing + # but failed when e.g. + # idx1 = Index( + # [True, True, True, True, True, True, True, True, False, False], dtype='bool' + # ) + # idx2 = Int64Index([0, 0, 1, 1, 2, 2], dtype='int64') mark = pytest.mark.xfail( reason="GH#44000 True==1", raises=ValueError, strict=False )