Skip to content

TST: clean CoW chained assignment warning iloc test case #56400

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

Conversation

jorisvandenbossche
Copy link
Member

Cleaning up the test added in #56166, now #56297 and #56289 are merged

@@ -35,36 +35,38 @@ def test_methods_iloc_warn(using_copy_on_write):
@pytest.mark.parametrize(
"func, args",
[
("replace", (1, 5)),
("replace", (4, 5)),
Copy link
Member Author

Choose a reason for hiding this comment

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

My understanding is that this test is just for the chained warning, so changing here to a value that is not present, so it will never trigger a "setting on view" warning at the block level (since there is nothing to replace, like for fillna there is nothing to fill), and then we only have to care about whether the chained warning is present or not

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.

yep all of them are chained assignment related, nothing about the actual view warning

@phofl phofl added this to the 2.2 milestone Dec 8, 2023
@phofl phofl merged commit 68c1af5 into pandas-dev:main Dec 8, 2023
@jorisvandenbossche jorisvandenbossche deleted the cow-warnings-getitem-cache-test-cleanup branch December 8, 2023 14:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants