Skip to content

Commit

Permalink
another failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
FBruzzesi committed Jul 13, 2024
1 parent 92831d9 commit c1bc50c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions tests/frame/with_columns_sequence_test.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from typing import Any

import numpy as np
import pytest

import narwhals.stable.v1 as nw
from tests.utils import compare_dicts
Expand All @@ -11,7 +12,14 @@
}


def test_with_columns(constructor: Any) -> None:
result = nw.from_native(constructor(data)).with_columns(d=np.array([4, 5]))
expected = {"a": ["foo", "bars"], "ab": ["foo", "bars"], "d": [4, 5]}
def test_with_columns(constructor_with_pyarrow: Any, request: Any) -> None:
if "table" in str(constructor_with_pyarrow):
request.applymarker(pytest.mark.xfail)

result = (
nw.from_native(constructor_with_pyarrow(data))
.with_columns(d=np.array([4, 5]))
.with_columns(d2=nw.col("d") ** 2)
)
expected = {"a": ["foo", "bars"], "ab": ["foo", "bars"], "d": [4, 5], "d2": [16, 25]}
compare_dicts(result, expected)

0 comments on commit c1bc50c

Please sign in to comment.