-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
improvements to install / testing [manually merge to master] #3659
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
Conversation
- require nose and mock for tests, not for normal installation - implement a test command in setup.py for invoking tests
Thanks for this. This is definitely an improvement. However, there's a few aspects I'm not crazy about. This creates a yet another way to run the tests, which I'm already not crazy about. We have:
Maybe replace Also, can you update the .travis.yml file to use this rather than tests.py? And drop the explicit installation of nose and mock from the .travis.yml so that we can test that what you've done here works (and stays working). |
@mdboom thanks for the feedback. I did not want to be too meddlesome for my first contribution ;) I will incorporate your feedback and amend the PR |
For a full replacement of test |
Perhaps we should add pep8 to the test dependencies too? |
yes. Btw, when did "tests_require" become available? I didn't see this On Fri, Oct 17, 2014 at 6:56 PM, Jens Hedegaard Nielsen <
|
renamed the issue to make it clearer what is being done. |
@WeatherGod Apparently it became available in 0.6a9 https://pypi.python.org/pypi/setuptools |
So, that's about what? 2 years ago, I guess? On Mon, Oct 20, 2014 at 3:35 AM, Holger Peters notifications@github.com
|
- specifiy parameters properly using user_options - add parameters used by travis to be passed on to nose
So I reworked the test command to truly parse parameters. So it seems travis failing stems from setup.py being called from an outside directory (and a quick glance at setup.py and setupext.py I think this is an assumption that is made on a few occasions in those files). I do not know the reasons why the tests are called from an outside directory on travis, but I guess that there are reasons for this (would be great if someone could point them out to me). I think making setup.py callable from the outside would trigger quite a few changes throughout the setup.py infrastructure of matplotlib. |
The tests are called from an outside directory to ensure that what is imported is precisely what is installed (and not anything, accidentally, from within the source tree). It's probably not totally necessary for a project like matplotlib where the top-level of code in the source tree is |
Sorry to take so long to get back to this. I think this is in great shape and I'm happy to merge it. One detail, though. Although we want to get away from the Alternatively, we can move this to the master branch and target it for a 1.5 release. @tacaswell: Any opinions? |
Just one small thing. We are also using mock now to build the documentation in addition to the tests so we should probably document that (along with Sphinx and numpydoc) now that it no longer is a install dependency. |
This is a pretty big change for a bug-fix release, but it does not touch any user code so I think it is OK. I changed my mind a couple of times while writing this, but I think leave this where it is + add a back-compatibility shim, and then remove The case we want to avoid is needing one incantation for the maintenance branch and one incantation for the master branch, if we are going to move to |
I agree. This does not need to go into v1.4.x - we can readily put it straight into master though. |
We need a decision on this, I am inclined to put this in for 1.4.3, @pelson wants to move this to master. |
@tacaswell, I would move it to master and merge there ASAP, so it gets more usage before a release. |
@HolgerPeters Can you also update all of the documentation which refers to It also looks like we have lost the ability to run a single test:
|
@HolgerPeters Can you rebase and re-target this at master? Replaced by #4110 |
This pull request addresses the issue #3649.
nose and mock are now listed as
tests_require
dependencies in the setup.py and automatically installed when tests are executed withpython setup.py tests
. Most of the code in tests.py has been moved to that test command in the setup.py