Skip to content

Commit

Permalink
test for Series with broadcast=True, raises when passed incorrect shape
Browse files Browse the repository at this point in the history
  • Loading branch information
jreback committed Feb 6, 2018
1 parent b244a4a commit 922bbc4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pandas/tests/frame/test_apply.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,11 @@ def test_apply_broadcast_error(self):
axis=1,
result_type='broadcast')

with pytest.raises(ValueError):
df.apply(lambda x: Series([1, 2]),
axis=1,
result_type='broadcast')

def test_apply_raw(self):
result0 = self.frame.apply(np.mean, raw=True)
result1 = self.frame.apply(np.mean, axis=1, raw=True)
Expand Down

0 comments on commit 922bbc4

Please sign in to comment.