MCPcopy Create free account
hub / github.com/celery/celery / test_iter

Method test_iter

t/unit/utils/test_threads.py:176–187  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

174class test_Local:
175
176 def test_iter(self):
177 x = Local()
178 x.foo = 'bar'
179 ident = x.__ident_func__()
180 assert (ident, {'foo': 'bar'}) in list(iter(x))
181
182 delattr(x, 'foo')
183 assert (ident, {'foo': 'bar'}) not in list(iter(x))
184 with pytest.raises(AttributeError):
185 delattr(x, 'foo')
186
187 assert x(lambda: 'foo') is not None
188
189
190class test_LocalStack:

Callers

nothing calls this directly

Calls 3

LocalClass · 0.90
xFunction · 0.85
raisesMethod · 0.80

Tested by

no test coverage detected