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