-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrecursive_funcs_test.py
More file actions
38 lines (26 loc) · 841 Bytes
/
Copy pathrecursive_funcs_test.py
File metadata and controls
38 lines (26 loc) · 841 Bytes
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
import pytest
from recursive_funcs import *
def test_recProduct_0():
assert(recProduct(1,5) == 5)
def test_recProduct_1():
assert(recProduct(-1,5) == -5)
def test_recProduct_2():
assert(recProduct(-1,-5) == 5)
def test_recProduct_3():
assert(recProduct(1,-5) == -5)
def test_recProduct_4():
assert(recProduct(4,5) == 20)
def test_recProduct_5():
assert(recProduct(0,5) == 0)
def test_isPalindrome_0():
assert(isPalindrome('RaCeCar') == True)
def test_isPalindrome_1():
assert(isPalindrome('detartrated') == True)
def test_isPalindrome_2():
assert(isPalindrome('madam') == True)
def test_isPalindrome_3():
assert(isPalindrome('octopus') == False)
def test_isPalindrome_4():
assert(isPalindrome('racecar') == True)
def test_isPalindrome_5():
assert(isPalindrome('raceCOr') == False)