@@ -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" ])
442442def 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" ])
451458def 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