Skip to content

Commit

Permalink
test(export): fix logic for checking column export
Browse files Browse the repository at this point in the history
  • Loading branch information
deepyaman committed Nov 15, 2024
1 parent 8e904aa commit fe03b1d
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions ibis/backends/tests/test_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -586,18 +586,22 @@ def test_column_to_memory(limit, awards_players, output_format, expected_column_
method = methodcaller(f"to_{output_format}", limit=limit)
res = method(awards_players.awardID)
assert isinstance(res, getattr(mod, expected_column_type))
assert (limit is not None and len(res) == limit) or len(
res
) == awards_players.count().execute()
assert (
(len(res) == limit)
if limit is not None
else len(res) == awards_players.count().execute()
)


@pytest.mark.parametrize("limit", limit_no_limit)
def test_column_to_list(limit, awards_players):
res = awards_players.awardID.to_list(limit=limit)
assert isinstance(res, list)
assert (limit is not None and len(res) == limit) or len(
res
) == awards_players.count().execute()
assert (
(len(res) == limit)
if limit is not None
else len(res) == awards_players.count().execute()
)


@pytest.mark.parametrize("limit", no_limit)
Expand Down

0 comments on commit fe03b1d

Please sign in to comment.