Home | History | Annotate | Download | only in test

Lines Matching defs:Local

16 def target(local, weaklist):
18 local.weak = weak
30 local = self._local()
33 t = threading.Thread(target=target, args=(local, weaklist))
41 # XXX _threading_local keeps the local of the last stopped thread alive.
45 # Assignment to the same thread local frees it sometimes (!)
46 local.someothervar = None
53 # of a threading.local derived class, the per-thread dictionary
57 class Local(self._local):
60 local = Local()
63 local.x = i
65 self.assertEqual(local.x, i)
73 class Local(self._local):
82 # 1) Involve Local in a cycle
83 cycle = [Local()]
95 passed = all(not hasattr(local, 'foo') for local in locals)
104 locals = [Local() for i in range(10)]
187 x.local = self._local()
188 x.local.x = x
199 _local = _threading_local.local
208 local_orig = _threading_local.local
210 _threading_local.local = _thread._local
212 _threading_local.local = local_orig