| 197 | # Check that exceptions are passed up the chain |
| 198 | self._write_error_test(OSError, BadIterable()) |
| 199 | class BadList: |
| 200 | def __len__(self): |
| 201 | return 10 |
| 202 | def __getitem__(self, i): |
| 203 | if i > 2: |
| 204 | raise OSError |
| 205 | self._write_error_test(OSError, BadList()) |
| 206 | class BadItem: |
| 207 | def __str__(self): |
no outgoing calls