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

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

Merged
merged 1 commit into from
Dec 23, 2022

Conversation

lgarrison
Copy link
Collaborator

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.

@lgarrison lgarrison added this to the v2.5.0 milestone Dec 22, 2022
@manodeep manodeep merged commit 8e942f0 into master Dec 23, 2022
@manodeep
Copy link
Owner

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

@manodeep manodeep deleted the pytest-skip-missing-data branch May 12, 2023 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants