Skip to content

Commit

Permalink
test: fix more array tests
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcloud committed Feb 1, 2024
1 parent 55e3b03 commit 3376022
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions ibis/backends/tests/test_array.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,9 +604,7 @@ def test_array_position(backend, con, a, expected_array):
expr = t.a.index(42)
result = con.execute(expr)
expected = pd.Series(expected_array, dtype="object")
assert frozenset(map(tuple, result.values)) == frozenset(
map(tuple, expected.values)
)
assert frozenset(result.values) == frozenset(expected.values)


@builtin_array
Expand Down Expand Up @@ -750,12 +748,10 @@ def test_array_union(con, a, b, expected_array):
expr = t.a.union(t.b)
result = con.execute(expr).map(set, na_action="ignore")
expected = pd.Series(expected_array, dtype="object")
assert len(result) == len(expected)

result.sort_values()
expected.sort_values()
for i, (lhs, rhs) in enumerate(zip(result, expected)):
assert lhs == rhs, f"row {i:d} differs"
assert frozenset(map(tuple, result.values)) == frozenset(
map(tuple, expected.values)
)


@builtin_array
Expand Down

0 comments on commit 3376022

Please sign in to comment.