MCPcopy
hub / github.com/celery/celery / test_listproxy

Method test_listproxy

t/unit/utils/test_local.py:130–146  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

128 assert iter(x)
129
130 def test_listproxy(self):
131 v = []
132 x = Proxy(lambda: v)
133 x.append(1)
134 x.extend([2, 3, 4])
135 assert x[0] == 1
136 assert x[:-1] == [1, 2, 3]
137 del (x[-1])
138 assert x[:-1] == [1, 2]
139 x[0] = 10
140 assert x[0] == 10
141 assert 10 in x
142 assert len(x) == 3
143 assert iter(x)
144 x[0:2] = [1, 2]
145 del (x[0:2])
146 assert str(x)
147
148 def test_complex_cast(self):
149

Callers

nothing calls this directly

Calls 2

ProxyClass · 0.90
extendMethod · 0.45

Tested by

no test coverage detected