

def testRecursive(self):
    local = TaskLocal()
    self.piet = 20

    def t():
        try:
            local.piet
            self.fail('expected attr error')
        except AttributeError:
            pass
    Tasklet.join(Tasklet.new(t)())
    local = TaskLocal(True)
    local.piet = 30

    def t():
        self.assertEquals(30, local.piet)
    Tasklet.join(Tasklet.new(t)())

dataset/ETHPy150Open concurrence/concurrence/test/testlocal.py TestTaskLocal.testRecursive/VarMisuse@16/20 `local`->`self`