Skip to content

Commit 3d5467a

Browse files
fix test coverage
1 parent 8afddd2 commit 3d5467a

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

tests/test_conditions.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -482,6 +482,34 @@ def test_condition_equal_columns_lists_only_inner() -> None:
482482
assert actual.to_list() == [True, False]
483483

484484

485+
def test_condition_equal_columns_two_lists_no_max_length() -> None:
486+
lhs = pl.DataFrame(
487+
{
488+
"pk": [1, 2],
489+
"a_left": [[1.0, 2.0], [3.0, 4.0]],
490+
},
491+
)
492+
rhs = pl.DataFrame(
493+
{
494+
"pk": [1, 2],
495+
"a_right": [[1.0, 2.0], [3.0, 4.0]],
496+
},
497+
)
498+
499+
with pytest.raises(
500+
ValueError,
501+
match="max_list_length must be provided for List-vs-List comparisons",
502+
):
503+
lhs.join(rhs, on="pk", maintain_order="left").select(
504+
condition_equal_columns(
505+
"a",
506+
dtype_left=lhs.schema["a_left"],
507+
dtype_right=rhs.schema["a_right"],
508+
max_list_length=None,
509+
)
510+
).to_series()
511+
512+
485513
@pytest.mark.parametrize(
486514
("dtype_left", "dtype_right", "can_compare_dtypes"),
487515
[

0 commit comments

Comments
 (0)