-
Notifications
You must be signed in to change notification settings - Fork 0
/
test_lab3.py
38 lines (26 loc) · 875 Bytes
/
test_lab3.py
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
'''
Created on Feb 8, 2015
@author: Brian Borowski
CS115 - Lab 3 Test Script
'''
import unittest
import lab3
class Test(unittest.TestCase):
def test01(self):
self.assertEqual(lab3.change(0, []), 0)
def test02(self):
self.assertEqual(lab3.change(1, []), float("inf"))
def test03(self):
self.assertEqual(lab3.change(1, [1, 5, 10]), 1)
def test04(self):
self.assertEqual(lab3.change(7, [1, 5, 10]), 3)
def test05(self):
self.assertEqual(lab3.change(29, [1, 5, 10, 20, 50, 100]), 6)
def test06(self):
self.assertEqual(lab3.change(67, [1, 5, 10, 20, 50, 100]), 5)
def test07(self):
self.assertEqual(lab3.change(72, [1, 5, 10, 20, 50, 100]), 4)
def test08(self):
self.assertEqual(lab3.change(189, [1, 5, 10, 20, 50, 100]), 9)
if __name__ == "__main__":
unittest.main()