MCPcopy
hub / github.com/keon/algorithms / setUp

Method setUp

algorithms/tree/bst_depth_sum.py:59–69  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

57
58class TestSuite(unittest.TestCase):
59 def setUp(self):
60 self.tree = bst()
61 self.tree.insert(9)
62 self.tree.insert(6)
63 self.tree.insert(12)
64 self.tree.insert(3)
65 self.tree.insert(8)
66 self.tree.insert(10)
67 self.tree.insert(15)
68 self.tree.insert(7)
69 self.tree.insert(18)
70
71 def test_depth_sum(self):
72 self.assertEqual(253, depth_sum(self.tree.root, 4))

Callers

nothing calls this directly

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected