Skip to content

Commit

Permalink
chore: remove remaning use of .label in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Dec 18, 2024
1 parent 5057012 commit 0e1d154
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ibis/backends/impala/tests/test_bucket_histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ def test_bucket_assign_labels(table, snapshot):
bucket = table.f.bucket(buckets, include_under=True)

size = table.group_by(bucket.name("tier")).size()
labelled = size.tier.label(
["Under 0", "0 to 10", "10 to 25", "25 to 50"], nulls="error"
labelled = size.tier.cases(

Check warning on line 84 in ibis/backends/impala/tests/test_bucket_histogram.py

View check run for this annotation

Codecov / codecov/patch

ibis/backends/impala/tests/test_bucket_histogram.py#L84

Added line #L84 was not covered by tests
*enumerate(["Under 0", "0 to 10", "10 to 25", "25 to 50"]), nulls="error"
).name("tier2")
expr = size.select(labelled, size[1])

Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/risingwave/tests/test_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def test_category_label(alltypes, df):
bins = [0, 10, 25, 50, 100]
labels = ["a", "b", "c", "d"]
bucket = d.bucket(bins)
expr = bucket.label(labels)
expr = bucket.cases(*enumerate(labels), else_=None)
result = expr.execute()

with warnings.catch_warnings():
Expand Down

0 comments on commit 0e1d154

Please sign in to comment.