From bfe21e67ac4aaf34c381cb41d893ae757c00e540 Mon Sep 17 00:00:00 2001 From: Marco Edward Gorelli Date: Tue, 2 Jul 2024 08:40:12 +0100 Subject: [PATCH] chore: increase local test coverage to 100 (#379) --- tests/frame/test_common.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/frame/test_common.py b/tests/frame/test_common.py index 3880a628a..1f09edc03 100644 --- a/tests/frame/test_common.py +++ b/tests/frame/test_common.py @@ -355,6 +355,15 @@ def test_cross_join(df_raw: Any, expected: dict[str, list[Any]]) -> None: df.join(df, how="cross", left_on="a") # type: ignore[arg-type] +def test_cross_join_non_pandas() -> None: + df = nw.from_native(df_pandas).select("a") + # HACK to force testing for a non-pandas codepath + df._dataframe._implementation = "modin" + result = df.join(df, how="cross") # type: ignore[arg-type] + expected = {"a": [1, 1, 1, 3, 3, 3, 2, 2, 2], "a_right": [1, 3, 2, 1, 3, 2, 1, 3, 2]} + compare_dicts(result, expected) + + @pytest.mark.parametrize( "df_raw", [df_pandas, df_lazy, df_pandas_nullable, df_pandas_pyarrow] )