Skip to content

TST/CoW: copy-on-write tests for add_prefix and add_suffix #49991

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 6 commits into from
Dec 3, 2022

Conversation

andrewchen1216
Copy link
Contributor

Tests added and passed if fixing a bug or adding a new feature

All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

This PR is related to #49473
add_suffix and add_prefix already had Copy-on-Write implemented, this PR will add test cases that explicitly tests the Copy-on-Write feature.

@mroeschke mroeschke added Testing pandas testing functions or related to the test suite Copy / view semantics labels Dec 1, 2022
Copy link
Member

@phofl phofl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

small comment, otherwise lgtm

@@ -252,6 +252,47 @@ def test_set_index(using_copy_on_write):
tm.assert_frame_equal(df, df_orig)


def test_add_prefix(using_copy_on_write):
# Case: adding prefix returns a new dataframe
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove the comments, just adding the issue as reference is sufficient

@phofl phofl added this to the 2.0 milestone Dec 3, 2022
@phofl phofl merged commit 5b85b43 into pandas-dev:main Dec 3, 2022
@phofl
Copy link
Member

phofl commented Dec 3, 2022

thx @andrewchen1216

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Copy / view semantics Testing pandas testing functions or related to the test suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants