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

Test against Pyodide in CI #3437

Closed
Zac-HD opened this issue Aug 12, 2022 · 6 comments · Fixed by #3870
Closed

Test against Pyodide in CI #3437

Zac-HD opened this issue Aug 12, 2022 · 6 comments · Fixed by #3870
Labels
interop how to play nicely with other packages tests/build/CI about testing or deployment *of* Hypothesis

Comments

@Zac-HD
Copy link
Member

Zac-HD commented Aug 12, 2022

Pyodide makes it easy to use Python code in your browser, which is great for demos like https://zhd.dev/ghostwriter/. It does also work a little differently to other platforms though, what with e.g. not having files, and so it would be nice to run our tests in CI to confirm that everything is working (to the extent possible).

Proof-of-concept for pytest in the browser: https://github.com/pydantic/pydantic-core/tree/main/wasm-preview; we can probably lean on that for our own CI.

@Zac-HD Zac-HD added the tests/build/CI about testing or deployment *of* Hypothesis label Aug 12, 2022
@Cheukting
Copy link
Contributor

For testing in CI do we use Selenium to run those testing HTML files? I am curious and would like to help if that's ok

@Zac-HD
Copy link
Member Author

Zac-HD commented Oct 20, 2022

I don't know any more than I wrote above! If you'd like to help, working out how to do this would be a big part of it 😅

@Cheukting
Copy link
Contributor

Cheukting commented Oct 20, 2022 via email

@Zac-HD
Copy link
Member Author

Zac-HD commented Jan 23, 2023

pytest-dev/pytest#10670 has some nice discussion about, and a working example of, using wasmtime with pytest. Looks like this is a bit less mature than I'd hoped, but it seems acheiveable this year - though we may need to start upstream in Pytest, and/or accept some disabled-on-wasm-for-now tests.

@Zac-HD Zac-HD added the interop how to play nicely with other packages label Jan 23, 2023
@Zac-HD
Copy link
Member Author

Zac-HD commented Sep 15, 2023

If using wasmtime as per the pytest issue above doesn't work when we try it, we could imitate Sympy's test setup (script, actions config, runtime check). We might even want to do both, to check both wasm and pyodide-on-node 🤔

@Zac-HD
Copy link
Member Author

Zac-HD commented Feb 2, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interop how to play nicely with other packages tests/build/CI about testing or deployment *of* Hypothesis
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants