Add doctest

This commit is contained in:
Bertrand Benjamin 2018-09-17 16:27:20 +02:00
parent b1241e0844
commit ec25cfab53
2 changed files with 8 additions and 0 deletions

View File

@ -210,6 +210,10 @@ def tree2tex(tree):
It calls __tex__ to render MOs. It calls __tex__ to render MOs.
:param tree: tree to render
:example:
>>> from ..tree import Tree >>> from ..tree import Tree
>>> t = Tree.from_str("2+3*4") >>> t = Tree.from_str("2+3*4")
>>> tree2tex(t) >>> tree2tex(t)

View File

@ -226,6 +226,10 @@ def tree2txt(tree):
It calls __txt__ to render MOs. It calls __txt__ to render MOs.
:param tree: tree to render
:example:
>>> from ..tree import Tree >>> from ..tree import Tree
>>> t = Tree.from_str("2+3*4") >>> t = Tree.from_str("2+3*4")
>>> tree2txt(t) >>> tree2txt(t)