Skip to content
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
10 changes: 10 additions & 0 deletions pandas/tests/frame/indexing/test_insert.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,13 @@ def test_insert_item_cache(self, using_array_manager):
ser.values[0] = 99

assert df.iloc[0, 0] == df[0][0]

def test_insert_frame(self):
Copy link
Member

Choose a reason for hiding this comment

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

Your test is broken

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Very confused. I am getting a seperate error message on my local.

Copy link
Member

Choose a reason for hiding this comment

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

The ci error is correct, you will have to debug locally why it is not raised for you

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed the error msg, but this is also failing. Would need some help, how same error raises multiple error msgs

# GH#42403
df = DataFrame({"col1": [1, 2], "col2": [3, 4]})
msg = (
"Expected a 1D array, got an array with shape "
r"\(2, 2\)|Wrong number of items passed 2, placement implies 1"
)
with pytest.raises(ValueError, match=msg):
df.insert(1, "newcol", df)