MCPcopy Index your code
hub / github.com/RustPython/RustPython / Driver

Class Driver

wasm/tests/conftest.py:76–89  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74
75
76class Driver(webdriver.Firefox):
77 def _print_panic(self):
78 stack = self.execute_script(
79 "return (window.__RUSTPYTHON_ERROR_MSG || '') + '\\n' + (window.__RUSTPYTHON_ERROR_STACK || '')"
80 )
81 if stack.strip():
82 print(f"RustPython panic stack:", stack, file=sys.stderr, sep="\n")
83
84 def execute_script(self, *args, **kwargs):
85 try:
86 return super().execute_script(*args, **kwargs)
87 except JavascriptException:
88 self._print_panic()
89 raise
90
91
92@pytest.fixture

Callers 1

wdriverFunction · 0.85

Calls

no outgoing calls

Tested by 1

wdriverFunction · 0.68