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

Python testing #1473

Merged
merged 4 commits into from
Jan 22, 2015
Merged

Python testing #1473

merged 4 commits into from
Jan 22, 2015

Conversation

longjon
Copy link
Contributor

@longjon longjon commented Nov 25, 2014

After #1472.

This PR adds Python testing of very basic functionality.

  • Testing is through the built-in unittest module. We might want to consider other testing libraries (like nose) in the future, but this is fine for now.
  • Hooks are added for the Makefile (make pytest) and Travis.
  • Tests are meant to exercise tricky things that come up in the Python wrapper (like memory management), and not be redundant with existing C++ tests.
  • Only very basic testing (of some functions from _caffe) is included so far. I'm going to go ahead and work on pycaffe on top of this, but BVLC folk are welcome to push more tests to this branch, and decide whether this should be merged right away (to at least have some testing) or a bit later (so that testing is not misleading by its paucity).
  • Includes a bugfix revealed by the tests.

@longjon longjon changed the title Pytest Python testing Nov 25, 2014
@longjon longjon force-pushed the pytest branch 14 times, most recently from e8030c9 to 6c58397 Compare November 25, 2014 22:19
@longjon
Copy link
Contributor Author

longjon commented Nov 26, 2014

And, Travis finally passes. Attempting to install the Python dependencies via pip was agonizingly slow, so I switched to using miniconda instead.

@jeffdonahue
Copy link
Contributor

Awesome, looks good to me from my brief read through. This should definitely be merged before any other PyCaffe changes.

@tleyden
Copy link

tleyden commented Nov 26, 2014

Attempting to install the Python dependencies via pip was agonizingly slow, so I switched to using miniconda instead.

Yup, I've watched that in agonizing pain while building a docker image.

Can you post details of using miniconda?

@longjon
Copy link
Contributor Author

longjon commented Nov 26, 2014

@tleyden: see the diff, which is based on https://gist.github.com/dan-blanchard/7045057 plus trial and error, and also this more official looking page: http://conda.pydata.org/docs/travis.html.

@shelhamer
Copy link
Member

Needs update from merge of #1472.

@longjon
Copy link
Contributor Author

longjon commented Dec 30, 2014

@shelhamer rebased.

longjon added a commit to longjon/caffe that referenced this pull request Dec 30, 2014
longjon added a commit to longjon/caffe that referenced this pull request Dec 30, 2014
longjon added a commit to longjon/caffe that referenced this pull request Dec 30, 2014
longjon added a commit to longjon/caffe that referenced this pull request Dec 31, 2014
longjon added a commit to longjon/caffe that referenced this pull request Dec 31, 2014
longjon added a commit to longjon/caffe that referenced this pull request Dec 31, 2014
@longjon
Copy link
Contributor Author

longjon commented Dec 31, 2014

To facilitate easier merging, I moved the bug fix that was here to #1228.

@longjon
Copy link
Contributor Author

longjon commented Dec 31, 2014

Haha, oops, I was testing for that bug fix. I'll leave this as it is for now, and either #1228 will be merged and I'll rebase, or I'll push the fix to dev at some point and rebase, or something.

longjon added a commit to longjon/caffe that referenced this pull request Jan 1, 2015
longjon added a commit to longjon/caffe that referenced this pull request Jan 2, 2015
longjon added a commit to longjon/caffe that referenced this pull request Jan 2, 2015
longjon added a commit to longjon/caffe that referenced this pull request Jan 3, 2015
longjon added a commit to longjon/caffe that referenced this pull request Jan 3, 2015
@longjon longjon mentioned this pull request Jan 3, 2015
@longjon
Copy link
Contributor Author

longjon commented Jan 7, 2015

Rebased after #1228 and passing again.

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

Successfully merging this pull request may close these issues.

4 participants