X-Git-Url: https://scm.cri.ensmp.fr/git/linpy.git/blobdiff_plain/2e558859456a109279713a2cbdd6c48a70a171c6..e9edace5958076df71291b81a03c04f545392afd:/linpy/tests/test_linexprs.py diff --git a/linpy/tests/test_linexprs.py b/linpy/tests/test_linexprs.py index 9599d06..f189260 100644 --- a/linpy/tests/test_linexprs.py +++ b/linpy/tests/test_linexprs.py @@ -161,7 +161,7 @@ class TestLinExpr(unittest.TestCase): self.assertEqual(self.x.subs(self.y, 3), self.x) self.assertEqual(self.pi.subs(self.x, 3), self.pi) self.assertEqual(self.expr.subs(self.x, -3), -2 * self.y) - self.assertEqual(self.expr.subs([(self.x, self.y), (self.y, self.x)]), 3 - self.x) + self.assertEqual(self.expr.subs([(self.x, self.y), (self.y, self.x)]), -2*self.x + self.y + 3) self.assertEqual(self.expr.subs({self.x: self.z, self.y: self.z}), 3 - self.z) self.assertEqual(self.expr.subs({self.x: self.z, self.y: self.z}), 3 - self.z) with self.assertRaises(TypeError): @@ -195,7 +195,7 @@ class TestLinExpr(unittest.TestCase): self.assertEqual(LinExpr.fromsympy(sp_x), self.x) self.assertEqual(LinExpr.fromsympy(sympy.Rational(22, 7)), self.pi) self.assertEqual(LinExpr.fromsympy(sp_x - 2*sp_y + 3), self.expr) - with self.assertRaises(ValueError): + with self.assertRaises(TypeError): LinExpr.fromsympy(sp_x*sp_y) @requires_sympy