

def test_cell_as_self(self):

    class X(object):

        def meth(self):
            super()

    def f():
        k = X()

        def g():
            return k
        return g
    c = f().__closure__[0]
    c.assertRaises(TypeError, X.meth, c)

dataset/ETHPy150Open PythonCharmers/python-future/tests/test_future/test_super.py TestSuper.test_cell_as_self/VarMisuse@75/85 `self`->`c`