Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed May 3, 2024
1 parent 0f4f5ec commit 92e48d0
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions py-polars/tests/unit/functions/test_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,18 +161,12 @@ def test_concat_horizontal_single_df(lazy: bool) -> None:
assert_frame_equal(out, expected)


@pytest.mark.parametrize("lazy", [False, True])
def test_concat_horizontal_duplicate_col(lazy: bool) -> None:
a = pl.DataFrame({"a": ["a", "b"], "b": [1, 2]})
b = pl.DataFrame({"c": [5, 7, 8, 9], "d": [1, 2, 1, 2], "a": [1, 2, 1, 2]})

if lazy:
dfs: list[pl.DataFrame] | list[pl.LazyFrame] = [a.lazy(), b.lazy()]
else:
dfs = [a, b]
def test_concat_horizontal_duplicate_col() -> None:
a = pl.LazyFrame({"a": ["a", "b"], "b": [1, 2]})
b = pl.LazyFrame({"c": [5, 7, 8, 9], "d": [1, 2, 1, 2], "a": [1, 2, 1, 2]})

with pytest.raises(pl.DuplicateError):
pl.concat(dfs, how="horizontal") # type: ignore[type-var]
pl.concat([a, b], how="horizontal").collect()


def test_concat_vertical() -> None:
Expand Down

0 comments on commit 92e48d0

Please sign in to comment.