Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
  • Loading branch information
lukemanley committed Dec 24, 2024
1 parent e153a9e commit 690cd52
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions py-polars/tests/unit/series/test_series.py
Original file line number Diff line number Diff line change
Expand Up @@ -1373,13 +1373,11 @@ def test_filter() -> None:

assert_series_equal(s.filter(mask), pl.Series("a", [1, 3]))
assert_series_equal(s.filter([True, False, True]), pl.Series("a", [1, 3]))


def test_filter_sequence() -> None:
s = pl.Series("a", [1, 2, 3])
assert_series_equal(s.filter([True, False, True]), pl.Series("a", [1, 3]))
assert_series_equal(s.filter(np.array([True, False, True])), pl.Series("a", [1, 3]))

with pytest.raises(RuntimeError, match="Expected a boolean mask"):
s.filter(np.array([1, 0, 1]))


def test_gather_every() -> None:
s = pl.Series("a", [1, 2, 3, 4])
Expand Down

0 comments on commit 690cd52

Please sign in to comment.