def test_massive_update(session):
    huge_data = dict((chr(a) * i, (ord('a') + 1 - a) * i)
                     for a in range(ord('a'), ord('z') + 1)
                     for i in range(1, 101))
    set_ = session.get(key('test_sortedset_massive_update'), SortedSet)
    set_.update(huge_data)
    assert dict(set_) == huge_data
    a_to_z = set('abcdefghijklmnopqrstuvwxyz')
    set_.update(a_to_z)
    for i in a_to_z:
        huge_data[i] += 1
    assert dict(set_) == huge_data
    data = dict((chr(a), a) for a in range(ord('a'), ord('z') + 1))
    setx = session.set(key('test_sortedsetx_massive_update'), data, SortedSet)
    set_.update(setx)
    for e, score in setx.items():
        huge_data[e] += score
    assert dict(set_) == huge_data
dataset/ETHPy150Open dahlia/sider/sidertests/test_sortedset.py/test_massive_update/swapped operands of `-`