MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / pytest_configure

Function pytest_configure

py/conftest.py:265–273  ·  view source on GitHub ↗

Export the pinned driver for services built without a path, and resolve a runfiles SE_MANAGER_PATH.

(config)

Source from the content-addressed store, hash-verified

263
264
265def pytest_configure(config):
266 """Export the pinned driver for services built without a path, and resolve a runfiles SE_MANAGER_PATH."""
267 executable = config.option.executable
268 driver = next((d for d in config.option.drivers or [] if d.lower() in _DRIVER_PATH_ENV_KEYS), None)
269 if driver and executable:
270 os.environ[_DRIVER_PATH_ENV_KEYS[driver.lower()]] = _resolve_bazel_path(executable).strip("'")
271 manager = os.environ.get("SE_MANAGER_PATH")
272 if manager and not Path(manager).exists() and Runfiles is not None:
273 os.environ["SE_MANAGER_PATH"] = Runfiles.Create().Rlocation(manager)
274
275
276def get_extensions_location():

Callers

nothing calls this directly

Calls 5

_resolve_bazel_pathFunction · 0.85
PathClass · 0.85
existsMethod · 0.80
getMethod · 0.65
CreateMethod · 0.45

Tested by

no test coverage detected