inducer / pymbolic

A simple package to do symbolic math (focus on code gen and DSLs)

Home Page:http://mathema.tician.de/software/pymbolic

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Test missing assertions

iandinwoodie opened this issue · comments

The following test doesn't seem to be making any assertions about expected behavior:

# {{{ test_expand
def test_expand():
from pymbolic import var, expand
x = var("x")
u = (x+1)**5
expand(u)
# }}}

Similarly, the following test seems to log a response but not make any assertions about it:

# {{{ test_graphviz
def test_graphviz():
from pymbolic import parse
expr = parse("(2*a[1]*b[1]+2*a[0]*b[0])*(hankel_1(-1,sqrt(a[1]**2+a[0]**2)*k) "
"-hankel_1(1,sqrt(a[1]**2+a[0]**2)*k))*k /(4*sqrt(a[1]**2+a[0]**2)) "
"+hankel_1(0,sqrt(a[1]**2+a[0]**2)*k)")
from pymbolic.mapper.graphviz import GraphvizMapper
gvm = GraphvizMapper()
gvm(expr)
logger.info("%s", gvm.get_dot_code())
# }}}

Thanks for reporting these. Contributions to address these would be very welcome.