Test: add doctest for a bug about tree encapsulation

This commit is contained in:
Bertrand Benjamin 2019-06-28 09:02:17 +02:00
parent f7ac9a4788
commit 152fa2301c
1 changed files with 4 additions and 0 deletions

View File

@ -99,6 +99,10 @@ class Expression(object):
<Exp: -3 / -15>
>>> Expression.random("{a}/{a*k} - 3*{b}", variables_scope={'a':{'min_max':(10, 30)}}) # doctest: +SKIP
<Exp: 18 / 108 - 3 * 9>
>>> e = Expression.random("{a}*x + {b}*x + 3")
>>> ee = e.simplify()
>>> print(e) # doctest: +SKIP
>>> print(ee) # doctest: +SKIP
"""
rd_t = Tree.from_str(template, random=True)