From c53043e959f7db578241ffb0a985ac8bb88c060a Mon Sep 17 00:00:00 2001 From: Terri Iwata Date: Sat, 25 Nov 2023 12:13:03 -0800 Subject: [PATCH] add test for iterable passed as columns argument for Table.apply --- tests/test_tables.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_tables.py b/tests/test_tables.py index e87ab4558..267e0ae10 100644 --- a/tests/test_tables.py +++ b/tests/test_tables.py @@ -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'),