def test_string_instantiates(kthary_tree): tree = kthary_tree fb_test = fizz_buzz_tree(tree) expected = "8" actual = fb_test.child[2].child[1].value assert actual == expected
def test_fizzbuzz_instantiates(kthary_tree): tree = kthary_tree fb_test = fizz_buzz_tree(tree) expected = "FizzBuzz" actual = fb_test.child[0].child[1].child[2].value assert actual == expected
def test_tree_instantiated_fail(kthary_tree): tree = kthary_tree fb_test = fizz_buzz_tree(tree) expected = 1 actual = fb_test.value assert actual != expected
def test_tree_instantiates(kthary_tree): fb_test = fizz_buzz_tree(kthary_tree) expected = "1" actual = fb_test.value assert actual == expected
def test_string_content_fails(): with pytest.raises(TypeError): string_tree = fizz_buzz_tree(TreeNode('1'))
def test_empty_tree_pass(): empty_tree = fizz_buzz_tree(None) expected = None actual = empty_tree assert actual == expected