Skip to content

Commit

Permalink
chore: increase local test coverage to 100 (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli authored Jul 2, 2024
1 parent c1f1a01 commit bfe21e6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/frame/test_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
)
Expand Down

0 comments on commit bfe21e6

Please sign in to comment.