Skip to content

Commit 43be6b7

Browse files
committed
EA attribute specifying whether copy=False is ignored
1 parent 1efb8c3 commit 43be6b7

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pandas/tests/extension/base/missing.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66

77

88
class BaseMissingTests:
9+
_supports_fillna_copy_false = True
10+
911
def test_isna(self, data_missing):
1012
expected = np.array([True, False])
1113

@@ -179,3 +181,9 @@ def test_fillna_fill_other(self, data):
179181
expected = pd.DataFrame({"A": data, "B": [0.0] * len(result)})
180182

181183
tm.assert_frame_equal(result, expected)
184+
185+
def test_fillna_readonly(self, data_missing):
186+
fill_value = data_missing[1]
187+
result = data_missing.fillna(fill_value, copy=False)
188+
expected = data_missing.fillna(fill_value, copy=True)
189+
tm.assert_extension_array_equal(result, expected)

0 commit comments

Comments
 (0)