Conditions | 3 |
Total Lines | 18 |
Code Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | """ |
||
11 | @pytest.mark.parametrize( |
||
12 | 'iterable, predicate, expected', |
||
13 | [ |
||
14 | ( |
||
15 | [], |
||
16 | lambda x: x > 3, |
||
1 ignored issue
–
show
|
|||
17 | ([], []), |
||
18 | ), |
||
19 | ( |
||
20 | [0, 1, 2, 3, 4, 5, 6, 7], |
||
21 | lambda x: x % 3 == 0, |
||
1 ignored issue
–
show
|
|||
22 | ([0, 3, 6], [1, 2, 4, 5, 7]), |
||
23 | ), |
||
24 | ], |
||
25 | ) |
||
26 | def test_partition(iterable, predicate, expected): |
||
27 | actual = partition(iterable, predicate) |
||
28 | assert actual == expected |
||
29 |