Move utopian tree challenge solution to a class (#144)

This commit is contained in:
Donne Martin
2017-02-05 12:15:53 -05:00
committed by GitHub
parent cf48629858
commit 2f2e25c33d
3 changed files with 39 additions and 32 deletions

View File

@@ -4,9 +4,10 @@ from nose.tools import assert_equal
class TestUtopianTree(object):
def test_utopian_tree(self):
assert_equal(calc_utopian_tree_height(0), 1)
assert_equal(calc_utopian_tree_height(1), 2)
assert_equal(calc_utopian_tree_height(4), 7)
solution = Solution()
assert_equal(solution.calc_utopian_tree_height(0), 1)
assert_equal(solution.calc_utopian_tree_height(1), 2)
assert_equal(solution.calc_utopian_tree_height(4), 7)
print('Success: test_utopian_tree')