test_pyutils.py 299 B

1234567
  1. from sympy.codegen.ast import Print
  2. from sympy.codegen.pyutils import render_as_module
  3. def test_standard():
  4. ast = Print('x y'.split(), r"coordinate: %12.5g %12.5g\n")
  5. assert render_as_module(ast, standard='python3') == \
  6. '\n\nprint("coordinate: %12.5g %12.5g\\n" % (x, y), end="")'