mirror of
https://github.com/donnemartin/interactive-coding-challenges.git
synced 2024-03-22 13:11:13 +08:00
21 lines
478 B
Python
21 lines
478 B
Python
import unittest
|
|
|
|
|
|
class TestUtopianTree(unittest.TestCase):
|
|
|
|
def test_utopian_tree(self):
|
|
solution = Solution()
|
|
self.assertEqual(solution.calc_utopian_tree_height(0), 1)
|
|
self.assertEqual(solution.calc_utopian_tree_height(1), 2)
|
|
self.assertEqual(solution.calc_utopian_tree_height(4), 7)
|
|
print('Success: test_utopian_tree')
|
|
|
|
|
|
def main():
|
|
test = TestUtopianTree()
|
|
test.test_utopian_tree()
|
|
|
|
|
|
if __name__ == '__main__':
|
|
main()
|