def test_transform(): t = symbol('t', '5 * {x: int, y: int}') expr = transform(t, z=t.x + t.y) assert expr.fields == ['x', 'y', 'z'] assert builtins.any( (t.x + t.y).isidentical(node) for node in expr._subterms())
def test_transform(): t = symbol('t', '5 * {x: int, y: int}') expr = transform(t, z=t.x + t.y) assert expr.fields == ['x', 'y', 'z'] assert builtins.any((t.x + t.y).isidentical(node) for node in expr._subterms())