Home | History | Annotate | Download | only in test

Lines Matching defs:Local

16 def target(local, weaklist):
18 local.weak = weak
29 local = self._local()
32 t = threading.Thread(target=target, args=(local, weaklist))
40 # XXX _threading_local keeps the local of the last stopped thread alive.
44 # Assignment to the same thread local frees it sometimes (!)
45 local.someothervar = None
52 # of a threading.local derived class, the per-thread dictionary
56 class Local(self._local):
59 local = Local()
62 local.x = i
64 self.assertEqual(local.x, i)
77 class Local(self._local):
85 # 1) Involve Local in a cycle
86 cycle = [Local()]
98 passed[0] = all(not hasattr(local, 'foo') for local in locals)
107 locals = [Local() for i in range(10)]
115 from thread import _local as local
116 from _threading_local import local as py_local
118 for cls in (local, py_local):
199 x.local = self._local()
200 x.local.x = x
207 _local = _threading_local.local
222 local_orig = _threading_local.local
224 _threading_local.local = _local
226 _threading_local.local = local_orig