Skip to content

Commit

Permalink
test(arrays): remove unnecessary series construction in `test_array_r…
Browse files Browse the repository at this point in the history
…emove` (#9741)
  • Loading branch information
NickCrews authored Aug 4, 2024
1 parent f403aa1 commit e213d02
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions ibis/backends/tests/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ def test_array_position(con, a, expected_array):
@builtin_array
@pytest.mark.notimpl(["polars"], raises=com.OperationNotDefinedError)
@pytest.mark.parametrize(
("inp", "exp"),
("input", "expected"),
[
param(
[[3, 2], [], [42, 2], [2, 2], []],
Expand All @@ -612,7 +612,8 @@ def test_array_position(con, a, expected_array):
pytest.mark.notyet(
["flink"],
raises=Py4JJavaError,
reason="SQL validation failed; Flink does not support ARRAY[]", # https://issues.apache.org/jira/browse/FLINK-20578
# https://issues.apache.org/jira/browse/FLINK-20578
reason="SQL validation failed; Flink does not support empty array construction",
)
],
),
Expand Down Expand Up @@ -652,11 +653,10 @@ def test_array_position(con, a, expected_array):
),
],
)
def test_array_remove(con, inp, exp):
t = ibis.memtable({"a": inp})
def test_array_remove(con, input, expected):
t = ibis.memtable({"a": input})
expr = t.a.remove(2)
result = con.execute(expr)
expected = pd.Series(exp, dtype="object")

lhs = frozenset(
# arg, things are coming back as nan
Expand All @@ -665,7 +665,7 @@ def test_array_remove(con, inp, exp):
else None
for v in result.values
)
rhs = frozenset(tuple(v) if v is not None else None for v in expected.values)
rhs = frozenset(tuple(v) if v is not None else None for v in expected)
assert lhs == rhs


Expand Down

0 comments on commit e213d02

Please sign in to comment.