interactive-coding-challenges/recursion_dynamic/coinchange_ways/test_coinchange_ways.py

20 lines
459 B
Python
Raw Normal View History

2015-07-19 11:21:29 +08:00
from nose.tools import assert_equal
class Challenge(object):
def test_coinchange_ways(self,solution):
2015-07-22 23:31:38 +08:00
assert_equal(solution(0, [1, 2]), 0)
assert_equal(solution(100, [1, 2, 3]), 884)
assert_equal(solution(1000, range(1, 101)), 15658181104580771094597751280645)
2015-07-19 11:21:29 +08:00
print('Success: test_coinchange_ways')
def main():
test = Challenge()
test.test_coinchange_ways(change_ways)
if __name__ == '__main__':
2015-07-22 23:31:38 +08:00
main()