Fix tests for Expression.subs
[linpy.git] / pypol / tests / test_linexprs.py
index 5862351..a3e81b0 100644 (file)
@@ -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)