Skip to content

Commit

Permalink
test(selectors): add test for non-expr-returning methods in selectors
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Aug 22, 2024
1 parent 0613ef1 commit 56095b4
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ibis/tests/expr/test_selectors.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,3 +517,15 @@ def test_window_function_group_by_order_by(penguins):
order_by=[penguins.sex, penguins.year],
)
)


def test_methods(penguins):
selector = s.across(s.all(), ibis.null(_.type()).name("foo_" + _.get_name()))
bound = selector.expand(penguins)
assert [col.get_name() for col in bound] == [
f"foo_{col}" for col in penguins.columns
]

selector = s.across(s.all(), ibis.null(_.type()))
bound = selector.expand(penguins)
assert [col.get_name() for col in bound] == penguins.columns

0 comments on commit 56095b4

Please sign in to comment.