

def test_hash_vs_eq():
    'catch: different hash for equal objects'
    a = (1 + S.Pi)
    ha = hash(a)
    a.is_positive
    assert (a.is_positive is True)
    assert (ha == hash(a))
    b = a.expand(trig=True)
    hb = hash(b)
    assert (a == b)
    assert (ha == hb)

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