From: Vivien Maisonneuve Date: Wed, 2 Jul 2014 07:08:56 +0000 (+0200) Subject: Fix tests for Expression.subs X-Git-Tag: 1.0~170 X-Git-Url: https://scm.cri.ensmp.fr/git/linpy.git/commitdiff_plain/b7d06b55d601833b4bef47afd732334ed77587fb?hp=2ffea1a47578a1b1d09906d57511062d68e6abea Fix tests for Expression.subs --- diff --git a/pypol/tests/test_linexprs.py b/pypol/tests/test_linexprs.py index 5862351..a3e81b0 100644 --- a/pypol/tests/test_linexprs.py +++ b/pypol/tests/test_linexprs.py @@ -155,7 +155,7 @@ class TestExpression(unittest.TestCase): self.assertEqual(self.expr.subs('x', -3), -2 * self.y) self.assertEqual(self.expr.subs([('x', self.y), ('y', self.x)]), 3 - self.x) self.assertEqual(self.expr.subs({'x': self.y, 'y': self.x}), 3 - self.x) - self.assertEqual(self.expr.subs({self.x: self.y, self.y: self.x}), 3 - self.x) + self.assertEqual(self.expr.subs({self.x: self.z, self.y: self.z}), -self.z + 3) def test_fromstring(self): self.assertEqual(Expression.fromstring('x'), self.x)