We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92604e9 commit 8a24f0dCopy full SHA for 8a24f0d
pandas/tests/extension/base/interface.py
@@ -31,6 +31,25 @@ def test_can_hold_na_valid(self, data):
31
32
def test_contains(self, data):
33
# GH-37867
34
+
35
+ data = data[~data.isna()]
36
37
+ scalar = data[0]
38
39
+ assert scalar in data
40
+ assert "124jhujbhjhb5" not in data
41
42
+ na_value = data.dtype.na_value
43
44
+ assert na_value not in data
45
46
+ for na_value_type in {None, np.nan, pd.NA, pd.NaT}:
47
+ assert na_value_type not in data
48
49
+ def test_contains_nan(self, data_missing):
50
+ # GH-37867
51
+ data = data_missing
52
53
scalar = data[~data.isna()][0]
54
55
assert scalar in data
0 commit comments