def test_setitem():
    app = App()
    while len(app):
        app.flush()

    e = test(1, 2, 3, foo="bar")

    assert e[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"] not in "Hello"
dataset/ETHPy150Open circuits/circuits/tests/core/test_event.py/test_setitem/operator `==` -> `not in`