From 152fa2301c55b6ce16309f7ca1241f1218279a81 Mon Sep 17 00:00:00 2001 From: Bertrand Benjamin Date: Fri, 28 Jun 2019 09:02:17 +0200 Subject: [PATCH] Test: add doctest for a bug about tree encapsulation --- mapytex/calculus/API/expression.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mapytex/calculus/API/expression.py b/mapytex/calculus/API/expression.py index f11f0d9..70d79e2 100644 --- a/mapytex/calculus/API/expression.py +++ b/mapytex/calculus/API/expression.py @@ -99,6 +99,10 @@ class Expression(object): >>> Expression.random("{a}/{a*k} - 3*{b}", variables_scope={'a':{'min_max':(10, 30)}}) # doctest: +SKIP + >>> 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)