Skip to content

Commit

Permalink
coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcoGorelli committed Jan 18, 2025
1 parent b439ccb commit 0628185
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions narwhals/_dask/group_by.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def var(

try:
import dask.dataframe.dask_expr as dx
except ModuleNotFoundError:
except ModuleNotFoundError: # pragma: no cover
import dask_expr as dx

return partial(dx._groupby.GroupBy.var, ddof=ddof)
Expand All @@ -67,7 +67,7 @@ def std(
try:
import dask.dataframe.dask_expr as dx
except ModuleNotFoundError:
import dask_expr as dx
import dask_expr as dx # pragma: no cover

return partial(dx._groupby.GroupBy.std, ddof=ddof)

Expand Down
2 changes: 1 addition & 1 deletion narwhals/_dask/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def add_row_index(
def validate_comparand(lhs: dx.Series, rhs: dx.Series) -> None:
try:
import dask.dataframe.dask_expr as dx
except ModuleNotFoundError:
except ModuleNotFoundError: # pragma: no cover
import dask_expr as dx

if not dx._expr.are_co_aligned(lhs._expr, rhs._expr): # pragma: no cover
Expand Down
2 changes: 1 addition & 1 deletion narwhals/dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def get_ibis() -> Any:
return sys.modules.get("ibis", None)


def get_dask_expr() -> Any:
def get_dask_expr() -> Any: # pragma: no cover
"""Get dask_expr module (if already imported - else return None)."""
return sys.modules.get("dask_expr", None)

Expand Down
1 change: 0 additions & 1 deletion tests/tpch_q1_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def test_q1(library: str, request: pytest.FixtureRequest) -> None:
df_raw = pl.scan_csv("tests/data/lineitem.csv")
elif library == "dask":
pytest.importorskip("dask")
pytest.importorskip("dask_expr", exc_type=ImportError)
import dask.dataframe as dd

df_raw = dd.from_pandas(
Expand Down

0 comments on commit 0628185

Please sign in to comment.