pytest-pyodide icon indicating copy to clipboard operation
pytest-pyodide copied to clipboard

Enhancement: Support for running tests from a built wheel without code

Open joemarshall opened this issue 1 year ago • 0 comments

What I'd like:

A way that given a pyodide wheel, I can run tests from it (e.g. from a test subpackage), have the list of tests extracted, then each run in turn, so they are correctly reported by pytest.

Why?

Because I'm building pyarrow, and the existing --run-tests-in-pyodide doesn't work, because conftest.py doesn't import correctly in a source distribution, because there are cython dependencies. Annoyingly I can't just install the local built copy to workaround this, because if I am in the pyarrow directory for the tests, it looks for the cython deps there also.

How I think it should work

A two stage process -

  1. Discover tests on pyodide. This installs the wheel and then populates a list of tests by calling pytest.main on the pyodide distribution.
  2. Run tests - this creates test cases based on the output of 1, and then calls them in the same way --run-tests-in-pyodide does.

joemarshall avatar Apr 15 '24 21:04 joemarshall