-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
TST verify return none inplace in tests/indexing #35230
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
TST verify return none inplace in tests/indexing #35230
Conversation
build failed, it says ci/run_tests.sh ImportError while loading conftest '/home/travis/build/pandas-dev/pandas/pandas/conftest.py'. ImportError: C extension: 'dtypes' from partially initialized module 'pandas._libs.tslibs' (most likely due to a circular import) (/home/travis/build/pandas-dev/pandas/pandas/_libs/tslibs/init.py) not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace --force' to build the C extensions first. The command "ci/run_tests.sh" exited with 4. |
had a similar issue locally and had to recompile everything ... |
@@ -25,7 +25,8 @@ def test_detect_chained_assignment(): | |||
|
|||
msg = "A value is trying to be set on a copy of a slice from a DataFrame" | |||
with pytest.raises(com.SettingWithCopyError, match=msg): | |||
zed["eyes"]["right"].fillna(value=555, inplace=True) | |||
return_value = zed["eyes"]["right"].fillna(value=555, inplace=True) | |||
assert return_value is None | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed this one
|
||
result = DataFrame(data) | ||
expected = DataFrame.from_dict(dict(zip([0], data)), orient="index") | ||
tm.assert_frame_equal(result, expected.reindex(result.index)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Could you put the reindex in the expected = ...
statement
@r-toroxel Thanks for the PR. The branch has conflicts with master. can you merge upstream/master |
thanks @r-toroxel |
verify we return none for all inplace calls in tests/indexing
related: #35210