### Description

Refactors benchmark script.

- One can select which benchmark (pystone, numpy, matplotlib, or `all`) to be run through command-line arguments.
  - We can divide each benchmark to separate CI jobs in the future if needed.
- Move pystone benchmark to benchmark directory, preventing it from being included in Pyodide release.

### Checklists

- [x] Add new / update outdated documentation

Close #2150
MAINT Refactor benchmark script. ### Description

Refactors benchmark script.

- One can select which benchmark (pystone, numpy, matplotlib, or `all`) to be run through command-line arguments.
  - We can divide each benchmark to separate CI jobs in the future if needed.
- Move pystone benchmark to benchmark directory, preventing it from being included in Pyodide release.

### Checklists

- [x] Add new / update outdated documentation

Close #2150
from pyodide_build.testing import set_webdriver_script_timeout


class _MockSelenium:
    script_timeout = 2

    def set_script_timeout(self, value):
        self._timeout = value


def test_set_webdriver_script_timeout():
    selenium = _MockSelenium()
    assert not hasattr(selenium, "_timeout")
    with set_webdriver_script_timeout(selenium, script_timeout=10):
        assert selenium._timeout == 10
    assert selenium._timeout == 2

from pyodide_build.testing import set_webdriver_script_timeout


class _MockSelenium:
    script_timeout = 2

    def set_script_timeout(self, value):
        self._timeout = value


def test_set_webdriver_script_timeout():
    selenium = _MockSelenium()
    assert not hasattr(selenium, "_timeout")
    with set_webdriver_script_timeout(selenium, script_timeout=10):
        assert selenium._timeout == 10
    assert selenium._timeout == 2
