Skip to content

Commit 4d9a6e4

Browse files
authored
TST / CoW: Adjust test to cover missing case (#54114)
1 parent fcf7811 commit 4d9a6e4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pandas/tests/copy_view/test_indexing.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -843,8 +843,9 @@ def test_del_frame(backend, using_copy_on_write):
843843
tm.assert_frame_equal(df2, df_orig[["a", "c"]])
844844
df2._mgr._verify_integrity()
845845

846-
# TODO in theory modifying column "b" of the parent wouldn't need a CoW
847-
# but the weakref is still alive and so we still perform CoW
846+
df.loc[0, "b"] = 200
847+
assert np.shares_memory(get_array(df, "a"), get_array(df2, "a"))
848+
df_orig = df.copy()
848849

849850
df2.loc[0, "a"] = 100
850851
if using_copy_on_write:

0 commit comments

Comments
 (0)