Closed
Description
Consider the following example
(lf) anutosh491@spbhat68:~/lpython/lpython$ cat examples/expr2.py
from lpython import S
from sympy import pi
def main0():
x: S = pi
assert(x == pi)
What we have been doing since the beginning is we
- Transform the assert block using
basic_str
, so we basically compare strings here (wheresymengine_stack_variable0
storespi
)
assert (basic_str(x) == basic_str(symengine_stack_variable0))
But what would be better is to do the following assert( basic_eq(x, symengine_stack_variable0) == 1)