Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion pytest_pyodide/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,13 @@ def get_driver(self, jspi=False):
options = Options()
options.add_argument("--headless")
options.add_argument("--no-sandbox")
if jspi:
driver = Chrome(options=options)
chrome_version = int(
driver.capabilities.get("browserVersion", "0").split(".")[0]
)
driver.quit()
Comment on lines +452 to +456
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am curious how expensive it is to initialize a Chrome instance here. If it actually runs a new Chrome browser, it would be nice if we can cache the value somewhere instead of calling it everytime in get_driver


if jspi and chrome_version < 137:
options.add_argument("--enable-features=WebAssemblyExperimentalJSPI")
options.add_argument("--enable-experimental-webassembly-features")
for flag in self._config.get_flags("chrome"):
Expand Down
Loading