def test_breath_first_solo(): """Test running breath on a tree with one Node.""" from bst import BST b = BST([25]) breath = b.breath_first() breath_first_list = [] for ii in breath: breath_first_list.append(ii) assert breath_first_list == [25]
def test_breath_first_empty(): """Test an empty Node returns empty list.""" from bst import BST b = BST() breath = b.breath_first() breath_first_list = [] for ii in breath: breath_first_list.append(ii) assert breath_first_list == []