yt-project / yt

Main yt repository
http://yt-project.org
Other
454 stars 272 forks source link

BLD: run pytest on wheels and sdist #4913

Closed yut23 closed 1 month ago

yut23 commented 1 month ago

PR Summary

The changes to pyproject.toml are needed to allow running the tests on the installed version of the code. The --ignore paths are resolved relative to the current directory before being compared to the test files if they're not already absolute. This works fine when running from the repository root, but pytest would have to be run from site-packages/ to get the same relative file paths and it would try to run the tests of every installed package.

--rootdir . makes pytest collect the tests from the installed package instead of the parent directory of the configuration file.

PR Checklist