curds: Remove unused PlaylistNode.get_root() function
Signed-off-by: Anna Schumaker <Anna@NoWheyCreamery.com>
This commit is contained in:
parent
426eeb0c97
commit
4586577cc5
|
@ -28,11 +28,6 @@ class PlaylistNode(tree.ETree):
|
|||
with self.tree_lock:
|
||||
return self.__insert__(len(self.children), child)
|
||||
|
||||
def get_root(self):
|
||||
if self.parent == None:
|
||||
return self
|
||||
return self.parent.get_root()
|
||||
|
||||
def reset(self):
|
||||
with self.lock:
|
||||
self.children.clear()
|
||||
|
|
|
@ -60,21 +60,6 @@ class TestPlaylistNode(unittest.TestCase):
|
|||
self.assertEqual(root.sibling, 2)
|
||||
self.assertEqual(root.parent, 3)
|
||||
|
||||
def test_node_get_root(self):
|
||||
root = node.PlaylistNode()
|
||||
a = node.PlaylistNode("a")
|
||||
b = node.PlaylistNode("b")
|
||||
c = node.PlaylistNode("c")
|
||||
|
||||
root.insert_child(a)
|
||||
a.insert_child(b)
|
||||
b.insert_child(c)
|
||||
|
||||
self.assertEqual(root.get_root(), root)
|
||||
self.assertEqual(a.get_root(), root)
|
||||
self.assertEqual(b.get_root(), root)
|
||||
self.assertEqual(c.get_root(), root)
|
||||
|
||||
def test_node_reset(self):
|
||||
root = node.PlaylistNode()
|
||||
a = node.PlaylistNode("a")
|
||||
|
|
Loading…
Reference in New Issue