MCPcopy Create free account
hub / github.com/apache/arrow / load_arrow

Method load_arrow

python/scripts/run_emscripten_tests.py:221–237  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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)

Callers

nothing calls this directly

Calls 2

execute_pythonMethod · 0.95
restart_browserMethod · 0.95

Tested by

no test coverage detected