Skip to content

Commit f1a5aa9

Browse files
committed
precommit changes
1 parent fe0d6fc commit f1a5aa9

File tree

2 files changed

+20
-7
lines changed

2 files changed

+20
-7
lines changed

pandas/tests/indexes/multi/test_setops.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -628,9 +628,9 @@ def test_union_with_duplicates_keep_ea_dtype(dupe_val, any_numeric_ea_dtype):
628628
def test_union_duplicates(index, request):
629629
# special case for mixed types
630630
if index.inferred_type == "mixed":
631-
pytest.mark.xfail(
632-
reason="mixed type union with duplicates is not supported"
633-
)(request.node)
631+
pytest.mark.xfail(reason="mixed type union with duplicates is not supported")(
632+
request.node
633+
)
634634

635635
# GH#38977
636636
if index.empty or isinstance(index, (IntervalIndex, CategoricalIndex)):

pandas/tests/indexes/test_common.py

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -440,20 +440,33 @@ def test_hasnans_isnans(self, index_flat):
440440
@pytest.mark.filterwarnings(r"ignore:PeriodDtype\[B\] is deprecated:FutureWarning")
441441
@pytest.mark.parametrize("na_position", [None, "middle"])
442442
def test_sort_values_invalid_na_position(index_with_missing, na_position, request):
443-
if getattr(index_with_missing, "inferred_type", None) in {"mixed", "mixed-integer", "mixed-int-string"}:
444-
request.applymarker(pytest.mark.xfail(reason="Test not supported for mixed type index"))
443+
if getattr(index_with_missing, "inferred_type", None) in {
444+
"mixed",
445+
"mixed-integer",
446+
"mixed-int-string",
447+
}:
448+
request.applymarker(
449+
pytest.mark.xfail(reason="Test not supported for mixed type index")
450+
)
445451

446452
with pytest.raises(ValueError, match=f"invalid na_position: {na_position}"):
447453
index_with_missing.sort_values(na_position=na_position)
448454

455+
449456
@pytest.mark.filterwarnings(r"ignore:PeriodDtype\[B\] is deprecated:FutureWarning")
450457
@pytest.mark.parametrize("na_position", ["first", "last"])
451458
def test_sort_values_with_missing(index_with_missing, na_position, request):
452459
# GH 35584. Test that sort_values works with missing values,
453460
# sort non-missing and place missing according to na_position
454461

455-
if getattr(index_with_missing, "inferred_type", None) in {"mixed", "mixed-integer", "mixed-int-string"}:
456-
request.applymarker(pytest.mark.xfail(reason="Test not supported for mixed type index"))
462+
if getattr(index_with_missing, "inferred_type", None) in {
463+
"mixed",
464+
"mixed-integer",
465+
"mixed-int-string",
466+
}:
467+
request.applymarker(
468+
pytest.mark.xfail(reason="Test not supported for mixed type index")
469+
)
457470

458471
if isinstance(index_with_missing, CategoricalIndex):
459472
request.applymarker(

0 commit comments

Comments
 (0)