

def test_self_becomes_this(self):

    def func(self):
        return self.foo
    code = py2js(func)
    lines = [line.strip() for line in code.split('\n') if code]
    assert ('return this.foo;' in lines)

dataset/ETHPy150Open zoofIO/flexx/flexx/pyscript/tests/test_parser2.py TestFunctions.test_self_becomes_this/VarMisuse@50/60 `line`->`code`