MCPcopy
hub / github.com/celery/celery / test_iter

Method test_iter

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

Source from the content-addressed store, hash-verified

32class test_Local:
33
34 def test_iter(self):
35 x = Local()
36 x.foo = 'bar'
37 ident = x.__ident_func__()
38 assert (ident, {'foo': 'bar'}) in list(iter(x))
39
40 delattr(x, 'foo')
41 assert (ident, {'foo': 'bar'}) not in list(iter(x))
42 with pytest.raises(AttributeError):
43 delattr(x, 'foo')
44
45 assert x(lambda: 'foo') is not None
46
47
48class test_LocalStack:

Callers

nothing calls this directly

Calls 3

LocalClass · 0.90
xFunction · 0.85
raisesMethod · 0.45

Tested by

no test coverage detected