def test_add(self): expr = Add(Variable("x"), Variable("y")) en = {"x": Number(1), "y": Number(2)} while expr.reducible: expr = expr.reduce(en) self.assertEqual(expr, Number(3))
def test_add(): expr = Add(Variable("x"), Variable("y")) en = {"x": Number(1), "y": Number(2)} while expr.reducible: expr = expr.reduce(en) assert expr == Number(3)