mirror of
https://github.com/donnemartin/interactive-coding-challenges
synced 2026-01-05 17:08:02 +00:00
Move utopian tree challenge solution to a class (#144)
This commit is contained in:
@@ -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')
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user