提交 9d2b4fde 编写于 作者: C Cleber Rosa

avocado/core/tree.py: replace get_ascii() for tree_view()

Commit 19cb82ce removed the `get_ascii()` method and added the utility
function `tree_view()`.  But there is a leftover using the old method.
Let's replace them.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 8b84df5c
......@@ -271,7 +271,7 @@ class TreeNode(object):
node = child
else:
raise ValueError("Path %s does not exists in this tree\n%s"
% (path, self.get_ascii()))
% (path, tree_view(self.root)))
return node
def iter_children_preorder(self):
......
......@@ -192,6 +192,10 @@ class TestTree(unittest.TestCase):
self.assertEqual(tree2.children[0].children[1].children[0].multiplex,
None)
def test_get_node(self):
self.assertRaises(ValueError,
self.tree.get_node, '/non-existing-node')
class TestPathParent(unittest.TestCase):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册