(selenium)
| 267 | |
| 268 | @run_in_pyodide |
| 269 | def test_pyproxy_iter_error(selenium): |
| 270 | from pyodide.code import run_js |
| 271 | |
| 272 | class T: |
| 273 | def __iter__(self): |
| 274 | raise Exception("hi") |
| 275 | |
| 276 | t = T() |
| 277 | run_js( |
| 278 | """ |
| 279 | (t) => { |
| 280 | assertThrows(() => t[Symbol.iterator](), "PythonError", "hi"); |
| 281 | } |
| 282 | """ |
| 283 | )(t) |
| 284 | |
| 285 | |
| 286 | @run_in_pyodide |