From 5123dc0f8a12b5619b0d51e2735e0c8c04e6c039 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Fri, 2 Feb 2018 18:33:08 +0300 Subject: [PATCH] add a doctest for Tree --- mapytex/calculus/core/tree.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mapytex/calculus/core/tree.py b/mapytex/calculus/core/tree.py index 8a82cc8..aa32bb2 100644 --- a/mapytex/calculus/core/tree.py +++ b/mapytex/calculus/core/tree.py @@ -76,6 +76,14 @@ class Tree(object): | > 2 | > 3 > 4 + >>> t = Tree.from_str("2+3*n") + >>> print(t) + + + > 2 + > * + | > 3 + | > n + """ t = MutableTree.from_str(expression) return cls.from_any_tree(t)