Skip to content

Instantly share code, notes, and snippets.

@eungju
Created September 9, 2009 06:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eungju/183510 to your computer and use it in GitHub Desktop.
Save eungju/183510 to your computer and use it in GitHub Desktop.
import unittest
def depth(tree):
return 1
class DepthTest(unittest.TestCase):
#Simplest tree is a tree which has just one node with no branches. In that case, the depth is 1.
def test_no_children(self):
tree = []
self.assertEquals(1, depth(tree))
unittest.main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment