Skip to content

Commit 8a1837c

Browse files
committed
test for Series with broadcast=True, raises when passed incorrect shape
1 parent 69084ea commit 8a1837c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pandas/tests/frame/test_apply.py

+5
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,11 @@ def test_apply_broadcast_error(self):
198198
axis=1,
199199
result_type='broadcast')
200200

201+
with pytest.raises(ValueError):
202+
df.apply(lambda x: Series([1, 2]),
203+
axis=1,
204+
result_type='broadcast')
205+
201206
def test_apply_raw(self):
202207
result0 = self.frame.apply(np.mean, raw=True)
203208
result1 = self.frame.apply(np.mean, axis=1, raw=True)

0 commit comments

Comments
 (0)