diff --git a/pandas/tests/arrays/string_/test_string.py b/pandas/tests/arrays/string_/test_string.py index 6a17a56a47cbc..5b4d586e69c1b 100644 --- a/pandas/tests/arrays/string_/test_string.py +++ b/pandas/tests/arrays/string_/test_string.py @@ -611,3 +611,11 @@ def test_setitem_scalar_with_mask_validation(dtype): msg = "Scalar must be NA or str" with pytest.raises(ValueError, match=msg): ser[mask] = 1 + + +def test_consitency_inplace(): + expected = pd.DataFrame({"M": [""]}, dtype="string") + df = pd.DataFrame({"M": [""]}, dtype="string") + df.where(df != "", np.nan, inplace=True) + expected = expected.where(expected != "", np.nan) + tm.assert_frame_equal(expected, df)