We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 679ba77 commit a19620eCopy full SHA for a19620e
pandas/tests/indexes/test_common.py
@@ -448,8 +448,15 @@ def test_hasnans_isnans(self, index_flat):
448
449
@pytest.mark.parametrize("na_position", [None, "middle"])
450
def test_sort_values_invalid_na_position(index_with_missing, na_position):
451
+ dtype = index_with_missing.dtype
452
+ warning = (
453
+ PerformanceWarning
454
+ if dtype.name == "string" and dtype.storage == "pyarrow"
455
+ else None
456
+ )
457
with pytest.raises(ValueError, match=f"invalid na_position: {na_position}"):
- index_with_missing.sort_values(na_position=na_position)
458
+ with tm.assert_produces_warning(warning):
459
+ index_with_missing.sort_values(na_position=na_position)
460
461
462
@pytest.mark.parametrize("na_position", ["first", "last"])
0 commit comments