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

Open
lucianopaz opened this issue Mar 26, 2024 · 2 comments
Labels

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.

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

No branches or pull requests

2 participants