Created
September 9, 2009 06:07
-
-
Save eungju/183510 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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