@@ -440,20 +440,33 @@ def test_hasnans_isnans(self, index_flat):
440
440
@pytest .mark .filterwarnings (r"ignore:PeriodDtype\[B\] is deprecated:FutureWarning" )
441
441
@pytest .mark .parametrize ("na_position" , [None , "middle" ])
442
442
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
+ )
445
451
446
452
with pytest .raises (ValueError , match = f"invalid na_position: { na_position } " ):
447
453
index_with_missing .sort_values (na_position = na_position )
448
454
455
+
449
456
@pytest .mark .filterwarnings (r"ignore:PeriodDtype\[B\] is deprecated:FutureWarning" )
450
457
@pytest .mark .parametrize ("na_position" , ["first" , "last" ])
451
458
def test_sort_values_with_missing (index_with_missing , na_position , request ):
452
459
# GH 35584. Test that sort_values works with missing values,
453
460
# sort non-missing and place missing according to na_position
454
461
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
+ )
457
470
458
471
if isinstance (index_with_missing , CategoricalIndex ):
459
472
request .applymarker (
0 commit comments