From bc97b5352548bdfb45764336d702925974b3b067 Mon Sep 17 00:00:00 2001
From: Matt Wala <wala1@illinois.edu>
Date: Wed, 1 Feb 2017 23:09:31 -0600
Subject: [PATCH] test_cse: Fix failure due to expression ordering difference
 in SymEngine.

---
 test/test_cse.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/test/test_cse.py b/test/test_cse.py
index a13ed6ab..c9f0264e 100644
--- a/test/test_cse.py
+++ b/test/test_cse.py
@@ -183,12 +183,13 @@ def test_multiple_expressions():
     rsubsts, _ = cse(reversed(l))
     assert substs == rsubsts
     assert reduced == [x1, x1 + z, x0]
-    l = [(x - z)*(y - z), x - z, y - z]
+    f = Function("f")
+    l = [f(x - z, y - z), x - z, y - z]
     substs, reduced = cse(l)
     rsubsts, _ = cse(reversed(l))
     assert substs == [(x0, -z), (x1, x + x0), (x2, x0 + y)]
     assert rsubsts == [(x0, -z), (x1, x0 + y), (x2, x + x0)]
-    assert reduced == [x1*x2, x1, x2]
+    assert reduced == [f(x1,x2), x1, x2]
     l = [w*y + w + x + y + z, w*x*y]
     assert cse(l) == ([(x0, w*y)], [w + x + x0 + y + z, x*x0])
     assert cse([x + y, x + y + z]) == ([(x0, x + y)], [x0, z + x0])
-- 
GitLab