(self)
| 219 | pass |
| 220 | |
| 221 | def load_arrow(self): |
| 222 | code = (f"import pyodide_js as pjs\n" |
| 223 | f"await pjs.loadPackage('{PYARROW_WHEEL_PATH.name}')\n") |
| 224 | for attempt in range(3): |
| 225 | # Set temporary timeout each attempt as Chrome restart creates a driver |
| 226 | self.driver.set_script_timeout(300) |
| 227 | try: |
| 228 | self.execute_python(code) |
| 229 | except TimeoutException: |
| 230 | if attempt == 2: |
| 231 | raise |
| 232 | print("Timed out loading PyArrow in browser. Restarting browser", |
| 233 | flush=True) |
| 234 | self.restart_browser() |
| 235 | else: |
| 236 | self.driver.set_script_timeout(1200) |
| 237 | return |
| 238 | |
| 239 | def restart_browser(self): |
| 240 | self.driver.get(self.url) |
nothing calls this directly
no test coverage detected