

def test_error_operations():
    q = Quantity(10, m)
    p = Quantity(5, s)
    raises(ValueError, (lambda : q.add(p)))
    raises(TypeError, (lambda : q.add(1)))
    raises(ValueError, (lambda : q.sub(p)))
    raises(TypeError, (lambda : q.sub(1)))

dataset/ETHPy150Open sympy/sympy/sympy/physics/unitsystems/tests/test_quantities.py test_error_operations/original