From 4841aef478285f452e94da451f8ecc9c5d66a59f Mon Sep 17 00:00:00 2001 From: Lafrite Date: Sat, 7 Mar 2015 18:23:44 +0100 Subject: [PATCH] new tests for render (not validate yet) --- test/test_render.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/test_render.py b/test/test_render.py index b94f995..bb42311 100644 --- a/test/test_render.py +++ b/test/test_render.py @@ -67,12 +67,14 @@ class TestTexRender(unittest.TestCase): [ 2, 3, op.mul, 4, op.add],\ [ 2, 3, 4, op.mul, op.add],\ [ 2, 3, 4, op.add, op.add],\ + [ 2, 3, 4, op.add, op.sub],\ ] wanted_render = [\ '( 2 + 3 ) \\times 4',\ '2 \\times 3 + 4',\ '2 + 3 \\times 4',\ '2 + 3 + 4',\ + '2 - ( 3 + 4 )',\ ] for (i,e) in enumerate(exps): rend = tex(e) @@ -92,8 +94,8 @@ class TestTexRender(unittest.TestCase): '2 + 3 x^{ 2 } + 2 x + 1' ,\ '2 - ( 3 x^{ 2 } + 2 x + 1 )' ,\ '2 - ( 3 x^{ 2 } + 2 x + 1 ) ( 3 x^{ 2 } + 2 x + 1 )' ,\ - '( 6 x^{ 2 } + 5 x + 4 ) + 3 x^{ 2 } + 2 x + 1' ,\ - '( 6 x^{ 2 } + 5 x + 4 ) - ( 3 x^{ 2 } + 2 x + 1 )' ,\ + '6 x^{ 2 } + 5 x + 4 + 3 x^{ 2 } + 2 x + 1' ,\ + '6 x^{ 2 } + 5 x + 4 - ( 3 x^{ 2 } + 2 x + 1 )' ,\ ] for (i,e) in enumerate(exps): rend = tex(e)