-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Deprecate matplotlib.test() #20586
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
Deprecate matplotlib.test() #20586
Conversation
033f462
to
45bcd44
Compare
I think we need this function to be able to run the tests against a "proper" install rather than a source install. IIRC @QuLogic uses this in the fedora packaging. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need this to support testing installed versions (primarily to support the packagers). @QuLogic can dismiss this with prejudice if I am wrong.
Maybe it's my ignorance on the topic, I would have thought that proper install or editable install doesn't make a difference for testing. But happy to learn something new. If this is only needed for packagers, we could still make it private and/or move it to |
I don't use it directly, but through You should also confirm what happens on Debian, cc @sandrotosi |
There are some difficulties in how pytest auto-discovery works if you naively run the |
Ah, might have to do with the test files being part of the package? I have to admit, that I have never really understood how pytest sets up the environment. |
pytest is very magical (which is both the best and worst thing about it!). |
No, not really, you just have to ensure that |
It also does extensive dependancy injection and re-writes the byte code! |
yep, Debian does the same (thanks for checking!) |
I've switched Fedora to use |
@QuLogic thanks for checking! Could you amend the deprecation notice with your findings to prevent any stumbling blocks? I'm not sure what needs to be explained so that current This is not urgent. We can push this to 3.6 if there is too much 3.5 stuff still to do. |
This is not a function that can be easily executed by the end user with a standard setup. Testing requires substantial setup such as installing additional dependencies and reference data. A function `matplotlib.test()` gives the false impression that a user can simply call it to verify if Matplotlib is working correctly. Running pytest explicitly has become a de-facto standard and allows users to customize the run by various command line arguments. There is no point in having a second own and more limited entry point to tests.
45bcd44
to
77f65e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm okay with this, though I wrote some of the API change note.
This is not a function that can be easily executed by the end user with a standard setup. Testing requires substantial setup such as installing additional dependencies and reference data. A function
matplotlib.test()
gives the false impression that a user can simply call it to verify if Matplotlib is working correctly. Running pytest explicitly has become a de-facto standard and allows users to customize the run by various command line arguments. There is no point in having a second own and more limited entry point to tests.