Skip to content

Commit d3f1f69

Browse files
committed
FIX: add test for ndarray value set
1 parent 6812b9d commit d3f1f69

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pandas/tests/frame/test_constructors.py

+5
Original file line numberDiff line numberDiff line change
@@ -283,6 +283,11 @@ def test_constructor_cast_failure(self):
283283
with pytest.raises(ValueError, match=msg):
284284
df["test"] = np.ones((4, 2))
285285

286+
# this is not ok
287+
msg = "Expected a 1D array, got an array with shape \\(4, 2, 3\\)"
288+
with pytest.raises(ValueError, match=msg):
289+
df["test"] = np.ones((4, 2, 3))
290+
286291
# this is ok
287292
df["foo2"] = np.ones((4, 2)).tolist()
288293

0 commit comments

Comments
 (0)