Skip to content

Commit

Permalink
add test for iterable passed as columns argument for Table.apply
Browse files Browse the repository at this point in the history
  • Loading branch information
Terri Iwata authored and Terri Iwata committed Nov 25, 2023
1 parent 2c706e2 commit c53043e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,9 @@ def test_apply(table):
np.array([18, 6, 6, 2]))
with(pytest.raises(ValueError)):
t.apply(lambda x, y: x + y, 'count', 'score')
with(pytest.warns(FutureWarning)):
assert_array_equal(t.apply(lambda x: x * x, ['points']),
np.array([1, 4, 4, 100]))

# Deprecated behavior
assert_array_equal(t.apply(lambda x, y: x * y, 'count', 'points'),
Expand Down

0 comments on commit c53043e

Please sign in to comment.