

def test_sanitize_assumptions():
    for cls in (Symbol, Dummy, Wild):
        x = cls('x', real=1, positive=0)
        assert (x.is_real is True)
        assert (x.is_positive is False)
        assert (cls('', real=True, positive=None).is_positive is None)
        raises(ValueError, (lambda : cls('', commutative=None)))
    raises(ValueError, (lambda : Symbol._sanitize(dict(commutative=None))))

dataset/ETHPy150Open sympy/sympy/sympy/core/tests/test_assumptions.py test_sanitize_assumptions/original