-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: raise informative error message for DataFrame.__eq__/__neq__
- Loading branch information
1 parent
e02685b
commit 3e9cb9a
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from __future__ import annotations | ||
|
||
from typing import TYPE_CHECKING | ||
|
||
import pytest | ||
|
||
import narwhals as nw | ||
|
||
if TYPE_CHECKING: | ||
from tests.utils import Constructor | ||
|
||
|
||
def test_eq_neq_raise(constructor: Constructor) -> None: | ||
with pytest.raises(NotImplementedError, match="please use expressions"): | ||
nw.from_native(constructor({"a": [1, 2, 3]})) == 0 # noqa: B015 | ||
with pytest.raises(NotImplementedError, match="please use expressions"): | ||
nw.from_native(constructor({"a": [1, 2, 3]})) != 0 # noqa: B015 |