Skip to content

CI: Update error message for np_dev #36864

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 3 commits into from
Oct 4, 2020
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
11 changes: 7 additions & 4 deletions pandas/tests/series/indexing/test_indexing.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,14 +367,17 @@ def test_2d_to_1d_assignment_raises():
x = np.random.randn(2, 2)
y = pd.Series(range(2))

msg = (
r"shape mismatch: value array of shape \(2,2\) could not be "
r"broadcast to indexing result of shape \(2,\)"
msg = "|".join(
[
r"shape mismatch: value array of shape \(2,2\) could not be "
r"broadcast to indexing result of shape \(2,\)",
r"cannot reshape array of size 4 into shape \(2,\)",
]
)
with pytest.raises(ValueError, match=msg):
y.loc[range(2)] = x

msg = r"could not broadcast input array from shape \(2,2\) into shape \(2\)"
msg = r"could not broadcast input array from shape \(2,2\) into shape \(2,?\)"
with pytest.raises(ValueError, match=msg):
y.loc[:] = x

Expand Down