Skip to content

refactor: change selenium_standalone to selenium_standalone_refresh#5902

Open
rbm0524 wants to merge 3 commits intopyodide:mainfrom
rbm0524:5772-tst-opt
Open

refactor: change selenium_standalone to selenium_standalone_refresh#5902
rbm0524 wants to merge 3 commits intopyodide:mainfrom
rbm0524:5772-tst-opt

Conversation

@rbm0524
Copy link
Contributor

@rbm0524 rbm0524 commented Sep 20, 2025

Description

close #5772

I changed the scope of selenium_standalone to module at fixture.py in pytest-pyodide and modified it to allow selenium_standalone_refresh to receive selenium_standalone.
In pyodide/pyodide, the test code was modified to use selenium_standalone_refresh, a refreshed selenium.
I hope this change will help you speed up the test.

Checklist

  • Add a CHANGELOG entry
  • Add / update tests
  • Add new / update outdated documentation

Calling load_package with a relative URL should load the package relative to the base URL of the page.
"""
selenium = selenium_standalone_noload
def test_load_relative_url(
Copy link
Member

Choose a reason for hiding this comment

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

Let's not introduce any changes that are not related to replacing selenium_standalone to selenium_standalone_refresh. It makes it difficult for the reviewer to review, and makes each commit less organized.

Copy link
Member

@ryanking13 ryanking13 left a comment

Choose a reason for hiding this comment

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

Thanks for working on this @rbm0524.

The most impactful test case that can benefit from this change in test_import, which is in

def test_import(selenium_standalone: Any, testcase: ImportTestCase) -> None:
.

It tests all the 300+ packages in Pyodide distribution, and it take more than 20 minutes in chrome (link)

So how about testing this fixture is working in that test case first, to see how much it is effetive, then apply in other test cases after we measure the impact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

TST Optimize package import test speed

2 participants