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

pymc.testing attempts to import pytest but pytest is not in pymc install requirements #7218

Closed
lucianopaz opened this issue Mar 26, 2024 · 3 comments · Fixed by #7357
Closed
Labels
bug hackathon Suitable for hackathon

Comments

@lucianopaz
Copy link
Contributor

Describe the issue:

a41d524 included the testing.py module at the root level of pymc. setup.py says that the install requires are taken from requirements.txt, and that file does not include pytest.

This makes from pymc.testing import anything fail unless you already have installed pytest. Should pymc raise some kind of informative message instead of saying ModuleNotFoundError: No module named 'pytest'?

Reproduceable code example:

from pymc import testing

Error message:

ModuleNotFoundError: No module named 'pytest'

PyMC version information:

pymc version: 5.11.0

Context for the issue:

No response

@lucianopaz lucianopaz added the bug label Mar 26, 2024
@ricardoV94
Copy link
Member

Maybe we should import pytest locally, because not everything in there requires it. We are only using pytest for the pytest.warns feature

@lucianopaz
Copy link
Contributor Author

Yes, that's fine with me.

@fonnesbeck fonnesbeck added the hackathon Suitable for hackathon label Jun 14, 2024
@bomtall
Copy link

bomtall commented Jun 15, 2024

I would like to take this (as part of the hackathon)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug hackathon Suitable for hackathon
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants