def test_fizzbuzz_and_beyond(): bst = BinarySearchTree() bst.add(15) bst.add(15) bst.add(15) expected = ['FizzBuzz', 'FizzBuzz', 'FizzBuzz'] actual = FizzBuzzTree(bst) assert actual == expected
def test_nofizzbuzz(): bst = BinarySearchTree() bst.add(2) bst.add(4) bst.add(7) bst.add(8) expected = [2, 4, 7, 8] actual = FizzBuzzTree(bst) assert actual == expected
def test_fizz_buzz(): bt = BinaryTree() bt.root = Node(3) bt.root.right = Node(5) bt.root.left = Node(15) bt.root.left.left = Node(1) actual = FizzBuzzTree(bt) expect = ['Fizz', 'FizzBuzz', 1, 'Buzz'] assert actual == expect
def test_fizzbuzz(): bst = BinarySearchTree() bst.add(1) bst.add(3) bst.add(5) bst.add(7) bst.add(11) bst.add(15) bst.add(34) expected = [1, 'Fizz', 'Buzz', 7, 11, 'FizzBuzz', 34] actual = FizzBuzzTree(bst) assert actual == expected
def test_fizz_buzz1(tree): assert FizzBuzzTree(tree) != tree
def test_fizz_buzz5(tree): assert type(FizzBuzzTree(tree).root.value) == str
def test_fizz_buzz4(tree): assert FizzBuzzTree(tree).root.right.left.value == 'FizzBuzz'