Skip to content

TST / CoW: Adjust test to cover missing case #54114

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pandas/tests/copy_view/test_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,8 +843,9 @@ def test_del_frame(backend, using_copy_on_write):
tm.assert_frame_equal(df2, df_orig[["a", "c"]])
df2._mgr._verify_integrity()

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

df2.loc[0, "a"] = 100
if using_copy_on_write:
Expand Down