Skip to content

Commit 57a3d12

Browse files
committed
Update utils_test.py
1 parent bc3124f commit 57a3d12

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

utils_test.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ def test_update_struct():
2121

2222
def test_removeall_list():
2323
assert removeall(4, []) == []
24-
assert removeall(4, [1,2,3,4]) == [1,2,3]
24+
assert removeall(4, [1, 2, 3, 4]) == [1, 2, 3]
25+
assert removeall(4, [4, 1, 4, 2, 3, 4, 4] == [1, 2, 3]
2526

2627
def test_removeall_string():
2728
assert removeall('s', '') == ''
@@ -33,15 +34,14 @@ def test_unique():
3334

3435
def test_product():
3536
assert product([1,2,3,4]) == 24
36-
37-
def test_count_if():
38-
assert count_if(callable, [42, None, max, min]) == 2
37+
assert product(range(1, 11)) == 3628800
3938

4039
def test_find_if():
4140
assert find_if(callable, [1, 2, 3]) == None
4241
assert find_if(callable, [3, min, max]) == min
4342

4443
def test_count_if():
44+
assert count_if(callable, [42, None, max, min]) == 2
4545
is_odd = lambda x: x % 2
4646
assert count_if(is_odd, []) == 0
4747
assert count_if(is_odd, [1, 2, 3, 4, 5]) == 3
@@ -55,7 +55,7 @@ def test_some():
5555
assert some(callable, [2, 3]) == 0
5656

5757
def test_isin():
58-
e= []
58+
e = []
5959
assert isin(e, [1, e, 3]) == True
6060
assert isin(e, [1, [], 3]) == False
6161

0 commit comments

Comments
 (0)