Skip to content

Commit

Permalink
Merge pull request #604 from iwatat/add_test_table_apply
Browse files Browse the repository at this point in the history
add test for iterable passed as columns argument for Table.apply
  • Loading branch information
davidwagner committed Nov 29, 2023
2 parents 2c706e2 + c53043e commit 2e0c20d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_tables.py
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 2e0c20d

Please sign in to comment.