Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MAINT Use run_in_pyodide in xgboost, opencv, and matplotlib tests #3184

Merged
merged 14 commits into from Oct 28, 2022

Conversation

ryanking13
Copy link
Member

@ryanking13 ryanking13 commented Oct 14, 2022

This PR refactors tests in xgboost, opencv-python, and matplotlib to use run_in_pyodide. No other things are affected

hoodmane added a commit to pyodide/pytest-pyodide that referenced this pull request Oct 18, 2022
ryanking13 ran into the problem in pyodide/pyodide#3184 (comment) that it's
inconvenient to send results from one @run_in_pyodide invocation to another.
This adds a mechanism to do so. A SeleniumHandle (perhaps can be named better)
can be returned to the host and when passed back into another @run_in_pyodide
function one can use it to access the object.

This should allow us to make fixtures specifically for use with @run_in_pyodide
functions that return one or more SeleniumHandles.
@ryanking13
Copy link
Member Author

Opened a separate PR for test failure unrelated to this: #3202

@ryanking13 ryanking13 changed the title MAINT Use run_in_pyodide in xgboost and opencv tests MAINT Use run_in_pyodide in xgboost, opencv, and matplotlib tests Oct 25, 2022


@matplotlib_test_decorator
@pytest.mark.xfail(
reason="TODO: pytest_pyodide.pyodide.JsException: InvalidStateError: An attempt was made to use an object that is not, or is no longer, usable"
Copy link
Member Author

Choose a reason for hiding this comment

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

This test started to fail, I guess it is also related to #3205.

@ryanking13
Copy link
Member Author

The cmdline-runner test failure is not related to this PR. Opened a issue about it (#3207).

Copy link
Member

@hoodmane hoodmane left a comment

Choose a reason for hiding this comment

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

Generally looks good to me.

packages/matplotlib/test_matplotlib.py Outdated Show resolved Hide resolved
packages/opencv-python/test_opencv_python.py Outdated Show resolved Hide resolved
@ryanking13 ryanking13 merged commit 53d85a9 into pyodide:main Oct 28, 2022
@ryanking13
Copy link
Member Author

Thanks again @hoodmane! PyodideHandle is really cool.

@ryanking13 ryanking13 deleted the maint/run-in-pyodide branch January 17, 2023 04:22
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.

None yet

2 participants