Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add test and test-coverage to Makefile #1470

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

Merged
merged 3 commits into from
Nov 19, 2012
Merged

Add test and test-coverage to Makefile #1470

merged 3 commits into from
Nov 19, 2012

Conversation

NelleV
Copy link
Member

@NelleV NelleV commented Nov 9, 2012

I run the tests very often, and I find it useful to have shortcuts in the makefile to run them. I've also added a shortcut to run the test coverage.

Thanks,
N

@pelson
Copy link
Member

pelson commented Nov 9, 2012

Wow, didn't even know there was a make file! I can't see any harm in adding these additions, though I guess a similar thing should be done for python setup.py tests or python setup.py check in the future (perhaps without those bespoke arguments to nosetest).

👍

@NelleV
Copy link
Member Author

NelleV commented Nov 9, 2012

Before merging, I should probably update the developper documentation to mention the makefile.

The two commands you mention here fail on my computer, with the traceback error: invalid command 'check'
What are these suppose to do?

@pelson
Copy link
Member

pelson commented Nov 9, 2012

What are these suppose to do?

Nothing just yet.

The "test" command is fairly standard in distribute and setuptools (http://packages.python.org/distribute/setuptools.html).

The "check" command seems to be a standard thing and is defined for mpl's setup.py (as seen with python setup.py --help-commands), but hasn't been defined to run the tests.

HTH,

@NelleV
Copy link
Member Author

NelleV commented Nov 9, 2012

I've added the commands to the documentation and the README.

@dmcdougall
Copy link
Member

Wow, didn't even know there was a make file! I can't see any harm in adding these additions, though I guess a similar thing should be done for python setup.py tests or python setup.py check in the future (perhaps without those bespoke arguments to nosetest).

+1e100


After installation, you can launch the test suite::

$ make test
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For me, this is not the preferred way of running the tests (in the same way the Makefile is not the preferred way of building the source).
I don't have a problem with adding the "test" makefile target, but I think I would prefer this line to be python tests.py.

@pelson
Copy link
Member

pelson commented Nov 13, 2012

Hi @NelleV : if adding a test / test-coverage target to the makefile makes things easier for some people to work with mpl, then I am all for that. My only concern (as indicated inline) is that it means there are two ways to run the tests, and therefore the documentation starts to say things like: "to run the tests, you can either do X or you can do Y." rather than "to run the tests, do X". For me, the latter is far clearer, as when I see a choice I wonder what the pros and cons of that choice are...

Cheers,

@NelleV
Copy link
Member Author

NelleV commented Nov 13, 2012

I can revert the changes in the documentation. I don't have a strong opinion on that.

@pelson
Copy link
Member

pelson commented Nov 13, 2012

I can revert the changes in the documentation

Perhaps just the changes to coding_guide.rst and removing the make test line from readme.rst? Thanks @NelleV

@NelleV
Copy link
Member Author

NelleV commented Nov 19, 2012

I've reverted those, and rebased master.

@pelson
Copy link
Member

pelson commented Nov 19, 2012

@NelleV : Your patience with me is incredible - thank you and good stuff! 😄

pelson added a commit that referenced this pull request Nov 19, 2012
Add ``test`` and ``test-coverage`` to Makefile
@pelson pelson merged commit d0cf23d into matplotlib:master Nov 19, 2012
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.

3 participants