diff --git a/pandas/tests/extension/base/missing.py b/pandas/tests/extension/base/missing.py index cee565d4f7c1e..3a149025421b2 100644 --- a/pandas/tests/extension/base/missing.py +++ b/pandas/tests/extension/base/missing.py @@ -6,6 +6,8 @@ class BaseMissingTests: + _supports_fillna_copy_false = True + def test_isna(self, data_missing): expected = np.array([True, False]) @@ -179,3 +181,9 @@ def test_fillna_fill_other(self, data): expected = pd.DataFrame({"A": data, "B": [0.0] * len(result)}) tm.assert_frame_equal(result, expected) + + def test_fillna_readonly(self, data_missing): + fill_value = data_missing[1] + result = data_missing.fillna(fill_value, copy=False) + expected = data_missing.fillna(fill_value, copy=True) + tm.assert_extension_array_equal(result, expected) diff --git a/pandas/tests/extension/test_numpy.py b/pandas/tests/extension/test_numpy.py index 691ce9341b788..e19d1d7471ea6 100644 --- a/pandas/tests/extension/test_numpy.py +++ b/pandas/tests/extension/test_numpy.py @@ -167,6 +167,8 @@ def skip_numpy_object(dtype, request): class TestNumpyExtensionArray(base.ExtensionTests): + _supports_fillna_copy_false = False + @pytest.mark.skip(reason="We don't register our dtype") # We don't want to register. This test should probably be split in two. def test_from_dtype(self, data):