manodeep / Corrfunc

⚡️⚡️⚡️Blazing fast correlation functions on the CPU.
https://corrfunc.readthedocs.io
MIT License
163 stars 50 forks source link

Skip data-based pytests when data files are absent #286

Closed lgarrison closed 1 year ago

lgarrison commented 1 year ago

Since we don't want to be distributing many MB of test data files with the PyPI package, we want pytest to skip any tests that rely on these files if they are absent. pytest lets us call pytest.skip(reason) from within the fixtures where we load the data files, providing a clean solution. The user will see skipped tests, and the reason they are skipped if verbose output is enabled.

Also, the readme is updated with the correct test instructions for a pip-based installation.

manodeep commented 1 year ago

Thanks @lgarrison!

I made the GH release but looks like since I re-used the 2.5.0 tag from the pre-release, the changes in this PR did not make it into the released version. I might make a version 2.5.1 to incorporate this PR. The PyPI version should be fine though but will update that as well just to keep versions in sync