(self)
| 32 | class 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 | |
| 48 | class test_LocalStack: |