[e988c2]: / tests / spec / series_ops / test_containment.py

Download this file

68 lines (56 with data), 1.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
from ..tables import p
title = "Testing for containment"
table_data = {
p: """
| i1
--+-----
1 | 101
2 | 201
3 | 301
4 |
""",
}
def test_is_in(spec_test):
spec_test(
table_data,
p.i1.is_in([101, 301]),
{
1: True,
2: False,
3: True,
4: None,
},
)
def test_is_not_in(spec_test):
spec_test(
table_data,
p.i1.is_not_in([101, 301]),
{
1: False,
2: True,
3: False,
4: None,
},
)
def test_is_in_empty_list(spec_test):
spec_test(
table_data,
p.i1.is_in([]),
{
1: False,
2: False,
3: False,
4: False,
},
)
def test_is_not_in_empty_list(spec_test):
spec_test(
table_data,
p.i1.is_not_in([]),
{
1: True,
2: True,
3: True,
4: True,
},
)