(self)
| 174 | class 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 | |
| 190 | class test_LocalStack: |