diff --git a/py-polars/tests/unit/dataframe/test_df.py b/py-polars/tests/unit/dataframe/test_df.py index 16d4328b9a60..549de1e0c433 100644 --- a/py-polars/tests/unit/dataframe/test_df.py +++ b/py-polars/tests/unit/dataframe/test_df.py @@ -1419,6 +1419,18 @@ def test_dot_product() -> None: assert isinstance(result, float) assert result == 32.0 + with pytest.raises( + pl.InvalidOperationError, + match="`dot` operation not supported for dtype `bool`" + ): + pl.Series([True, False, False, True]) @ pl.Series([4, 5, 6, 7]) + + with pytest.raises( + pl.InvalidOperationError, + match="`dot` operation not supported for dtype `str`" + ): + pl.Series([1, 2, 3, 4]) @ pl.Series(["True", "False", "False", "True"]) + def test_hash_rows() -> None: df = pl.DataFrame({"a": [1, 2, 3, 4], "b": [2, 2, 2, 2]})