From 563a0f53232be93ca4e2b2b6ad805ae78e8391f1 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Sat, 12 Oct 2013 16:24:09 -0500 Subject: [PATCH] PEP8 test_maxima --- test/test_maxima.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/test/test_maxima.py b/test/test_maxima.py index 04a670c..824caed 100644 --- a/test/test_maxima.py +++ b/test/test_maxima.py @@ -25,6 +25,7 @@ THE SOFTWARE. import pytest from pytools.test import mark_test + def test_kernel(): pytest.importorskip("pexpect") @@ -35,6 +36,7 @@ def test_kernel(): assert knl.eval_str("2+2").strip() == "4" knl.shutdown() + def pytest_funcarg__knl(request): pytest.importorskip("pexpect") @@ -43,6 +45,7 @@ def pytest_funcarg__knl(request): request.addfinalizer(knl.shutdown) return knl + def test_setup(knl): pytest.importorskip("pexpect") @@ -50,6 +53,7 @@ def test_setup(knl): ["k:1/(sqrt((x0-(a+t*b))^2+(y0-(c+t*d))^2+(z0-(e+t*f))^2))"], "sum(diff(k, t,deg)*t^deg,deg,0,6)") + def test_error(knl): from pymbolic.maxima import MaximaError try: @@ -62,6 +66,7 @@ def test_error(knl): except MaximaError: pass + def test_strict_round_trip(knl): from pymbolic import parse from pymbolic.primitives import Quotient @@ -84,6 +89,7 @@ def test_strict_round_trip(knl): print(result) assert round_trips_correctly + def test_lax_round_trip(knl): from pymbolic.maxima import MaximaParser k_setup = [ @@ -97,6 +103,7 @@ def test_lax_round_trip(knl): k_setup + [("result2", parsed)], "ratsimp(result-result2)") == 0 + def test_diff(): pytest.importorskip("pexpect") @@ -104,12 +111,14 @@ def test_diff(): from pymbolic import parse diff(parse("sqrt(x**2+y**2)"), parse("x")) + @mark_test.xfail def test_long_command(knl): from pymbolic.maxima import set_debug set_debug(4) knl.eval_str("+".join(["1"]*16384)) + if __name__ == "__main__": import sys if len(sys.argv) > 1: -- GitLab