Test: separate expression build and showing it
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
0cadc6734e
commit
7f8939eab2
@ -136,9 +136,11 @@ class Expression(object):
|
|||||||
:returns: TODO
|
:returns: TODO
|
||||||
|
|
||||||
:example:
|
:example:
|
||||||
>>> Expression.random("{a}/{a*k}") # doctest: +SKIP
|
>>> e = Expression.random("{a}/{a*k}")
|
||||||
|
>>> e # doctest: +SKIP
|
||||||
<Exp: -3 / -15>
|
<Exp: -3 / -15>
|
||||||
>>> Expression.random("{a}/{a*k} - 3*{b}", variables_scope={'a':{'min_max':(10, 30)}}) # doctest: +SKIP
|
>>> e = Expression.random("{a}/{a*k} - 3*{b}", variables_scope={'a':{'min_max':(10, 30)}})
|
||||||
|
>>> e # doctest: +SKIP
|
||||||
<Exp: 18 / 108 - 3 * 9>
|
<Exp: 18 / 108 - 3 * 9>
|
||||||
>>> e = Expression.random("{a}*x + {b}*x + 3", ["a>b"], rejected=[0, 1])
|
>>> e = Expression.random("{a}*x + {b}*x + 3", ["a>b"], rejected=[0, 1])
|
||||||
>>> ee = e.simplify()
|
>>> ee = e.simplify()
|
||||||
|
Loading…
Reference in New Issue
Block a user