Exemplo n.º 1
0
 def test_zero(self):
     self.assertEqual(0, get_change(0))
Exemplo n.º 2
0
 def test_1(self):
     self.assertEqual(1, get_change(1))
Exemplo n.º 3
0
 def test_9(self):
     self.assertEqual(3, get_change(9))
Exemplo n.º 4
0
 def test_sample_1(self):
     self.assertEqual(9, get_change(34))
Exemplo n.º 5
0
 def test_2(self):
     self.assertEqual(2, get_change(2))
Exemplo n.º 6
0
 def test_6(self):
     self.assertEqual(2, get_change(6))
Exemplo n.º 7
0
 def test_3(self):
     self.assertEqual(1, get_change(3))
Exemplo n.º 8
0
 def test_4(self):
     self.assertEqual(1, get_change(4))
Exemplo n.º 9
0
from change_dp import get_change
from test.asserts import assert_equal
"""
Sample 1.
Input:
2
Output:
2
2 = 1 + 1.
Sample 2.
Input:
34
Output:
9
34 = 3 + 3 + 4 + 4 + 4 + 4 + 4 + 4 + 4.
"""

assert_equal(2, get_change(2), "sample 1")
assert_equal(9, get_change(34), "sample 2")
def test_change_dp(m, expected):
    assert get_change(m) == expected
Exemplo n.º 11
0
 def test_1(self):
     m = 100
     c = [10]
     self.assertEqual(get_change(m, c), 10)
Exemplo n.º 12
0
 def test_3(self):
     m = 18
     c = [10 , 4]
     self.assertEqual(get_change(m, c), 3)
Exemplo n.º 13
0
 def test_2(self):
     m = 0
     c = [1, 2, 3]
     self.assertEqual(get_change(m, c), 0)