Skip to content

Commit

Permalink
pyspark test
Browse files Browse the repository at this point in the history
  • Loading branch information
FBruzzesi committed Jan 10, 2025
1 parent 75372a6 commit a2f4993
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 954 deletions.
9 changes: 2 additions & 7 deletions tests/expr_and_series/any_all_test.py
Original file line number Diff line number Diff line change
@@ -1,17 +1,12 @@
from __future__ import annotations

import pytest

import narwhals.stable.v1 as nw
from tests.utils import Constructor
from tests.utils import ConstructorEager
from tests.utils import assert_equal_data


def test_any_all(request: pytest.FixtureRequest, constructor: Constructor) -> None:
if "pyspark" in str(constructor):
request.applymarker(pytest.mark.xfail)

def test_any_all(constructor: Constructor) -> None:
df = nw.from_native(
constructor(
{
Expand All @@ -24,7 +19,7 @@ def test_any_all(request: pytest.FixtureRequest, constructor: Constructor) -> No
result = df.select(nw.col("a", "b", "c").all())
expected = {"a": [False], "b": [True], "c": [False]}
assert_equal_data(result, expected)
result = df.select(nw.all().any())
result = df.select(nw.col("a", "b", "c").any())
expected = {"a": [True], "b": [True], "c": [False]}
assert_equal_data(result, expected)

Expand Down
4 changes: 2 additions & 2 deletions tests/expr_and_series/null_count_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
def test_null_count_expr(
constructor: Constructor, request: pytest.FixtureRequest
) -> None:
if ("pyspark" in str(constructor)) or "duckdb" in str(constructor):
if "duckdb" in str(constructor):
request.applymarker(pytest.mark.xfail)
df = nw.from_native(constructor(data))
result = df.select(nw.all().null_count())
result = df.select(nw.col("a", "b").null_count())
expected = {
"a": [2],
"b": [1],
Expand Down
Loading

0 comments on commit a2f4993

Please sign in to comment.