

def testTaskInstance(self):
    AdderInstance = TaskInstance(True)
    try:
        AdderInstance.sum(10)
        self.fail('expected attribute error')
    except AttributeError:
        pass

    def t():
        return AdderInstance.sum(20)
    with self.set(Adder(10)):
        self.assertEquals(30, AdderInstance.sum(20))
        self.assertEquals(30, Tasklet.join(Tasklet.new(t)()))
    try:
        AdderInstance.sum(10)
        self.fail('expected attribute error')
    except AttributeError:
        pass

dataset/ETHPy150Open concurrence/concurrence/test/testlocal.py TestTaskInstance.testTaskInstance/VarMisuse@62/82 `AdderInstance`->`self`