def test_disjoint_right(self):
     distances = get_distances_bfs(disjoint_edges, 3)
     self.assertEqual(distances, {3: 0, 4: 1, 5: 1})
 def test_disjoint_left(self):
     distances = get_distances_bfs(disjoint_edges, 0)
     self.assertEqual(distances, {0: 0, 1: 1, 2: 1})
 def test_tree_root(self):
     distances = get_distances_bfs(tree_edges, 0)
     self.assertEqual(distances, {0: 0, 1: 1, 2: 1, 3: 2, 4: 2, 5: 2, 6: 2})
 def test_tree_mid(self):
     distances = get_distances_bfs(tree_edges, 2)
     self.assertEqual(distances, {2: 0, 5: 1, 6: 1})
 def test_base(self):
     distances = get_distances_bfs(no_edges, 0)
     self.assertEqual(distances, {0: 0})