

def test_setitem():
    app = App()
    while len(app):
        app.flush()
    e = test(1, 2, 3, foo='bar')
    assert (app[0] == 1)
    assert (e['foo'] == 'bar')
    e[0] = 0
    e['foo'] = 'Hello'

    def f(e, k, v):
        e[k] = v
    py.test.raises(TypeError, f, e, None, None)
    assert (e[0] == 0)
    assert (e['foo'] == 'Hello')

dataset/ETHPy150Open circuits/circuits/tests/core/test_event.py test_setitem/VarMisuse@47/53 `e`->`app`