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

coverage support #125

Open
joemarshall opened this issue Nov 22, 2023 · 3 comments
Open

coverage support #125

joemarshall opened this issue Nov 22, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@joemarshall
Copy link
Collaborator

I cannot work out if there's any way to use coverage with this?

If not, it would be great if there was a way - we have coverage available in pyodide, so it is basically a case of adding coverage calls, and some way of bringing them back into the containing environment.

@ryanking13 ryanking13 added the enhancement New feature or request label Nov 23, 2023
@ryanking13
Copy link
Member

Do you mean adding a coverage report for code that runs inside Pyodide? There is an issue about it (pyodide/pyodide#2873), but I think nobody tried to implement it.

some way of bringing them back into the containing environment.

This will be the most tricky part I guess. I would appreciate it if you could do some experiment to see if it is possible.

@joemarshall
Copy link
Collaborator Author

@ryanking13 I did this manually in urllib3 ci - it works like: load coverage, run python code, return the coverage data. I don't know if it is worth implementing in pytest-pyodide more generally.

@ryanking13
Copy link
Member

Cool. We can probably support something more general: extracting the file inside the Pyodide filesystem to the host, which can be used for coverage file as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants