          insert(node, 2)
          insert(node, 8)
          insert(node, 1)
          insert(node, 3)
  
          with captured_output() as (out, err):
              bfs(node, sys.stdout.write)
              assert_equal(out.getvalue().strip(), '52813')
  
          print('Success: test_bfs')
  
  
  def main():
 
</s> remove     "\n",
    "        with captured_output() as (out, err):\n",
    "            bfs(node, sys.stdout.write)\n",
    "            assert_equal(out.getvalue().strip(), '52813')\n",
 </s> add     "        bfs(node, self.results.add_result)\n",
    "        assert_equal(str(self.results), '[5, 2, 8, 1, 3]')\n", </s> remove     "        with captured_output() as (out, err):\n",
    "            root.bfs(sys.stdout.write)\n",
    "            assert_equal(out.getvalue().strip(), '52813')\n",
 </s> add     "    def test_bfs(self):\n",
    "        node = Node(5)\n",
    "        insert(node, 2)\n",
    "        insert(node, 8)\n",
    "        insert(node, 1)\n",
    "        insert(node, 3)\n",
    "        bfs(node, self.results.add_result)\n",
    "        assert_equal(str(self.results), '[5, 2, 8, 1, 3]')\n", </s> remove     "    def test_bfs(self):\n",
    "        root = Node(5)\n",
    "        root.insert(2)\n",
    "        root.insert(8)\n",
    "        root.insert(1)\n",
    "        root.insert(3)\n",
 </s> add     "    def __init__(self):\n",
    "        self.results = Results()\n",
        bfs(node, self.results.add_result)
        assert_equal(str(self.results), '[5, 2, 8, 1, 3]')
          insert(node, 2)
          insert(node, 8)
          insert(node, 1)
          insert(node, 3)
        bfs(node, self.results.add_result)
        assert_equal(str(self.results), '[5, 2, 8, 1, 3]')
        bfs(node, self.results.add_result)
        assert_equal(str(self.results), '[5, 2, 8, 1, 3]')
        bfs(node, self.results.add_result)
        assert_equal(str(self.results), '[5, 2, 8, 1, 3]')
        bfs(node, self.results.add_result)
        assert_equal(str(self.results), '[5, 2, 8, 1, 3]')
  
          print('Success: test_bfs')
  
  
  def main():
keep keep keep keep replace replace replace replace keep keep keep keep keep
 Reworked tree bfs unit tests. 
graphs_trees/tree_bfs/test_bfs.py