def test_lumberjack(self):
     for code, boards in sizes:
         tree = Tree(code)
         graham = Lumberjack()
         self.assertIsNone(graham.tree)
         graham.tree = tree
         brds = graham.cut_down_tree()
         self.assertIsNone(graham.tree)
         self.assertEqual(boards, brds)
Esempio n. 2
0
 def test_lumber(self):
     for code, boards in sizes:
         tree = Tree(code)
         self.assertEqual(boards, tree.get_boards())
 def test_lumber(self):
     for code, boards in sizes:
         tree = Tree(code)
         self.assertEqual(boards, tree.get_boards())
 def test_string(self):
     tree = Tree("L")
     self.assertEqual(str(tree), "Tree: Size L")