Skip tests rather than failing if P4python or python-subversion bindings are not installed
Review Request #76 — Created June 16, 2007 and submitted — Latest diff uploaded
Here is a patch which changes get_scmtool to raise nose.SkipTest instead of an ImportError when instantiating a scmtool class. With this patch, I can run the tests on my amd64 machine which I was not able to get P4Python installed on (I've sent patches off to perforce), and I get 5 tests skipped rather than failed, a much nicer result. I think this means that people writing an SCMTool should be careful to allow their module to be imported even if the SCMTool is not installed, and only do any tool-specific imports in __init__. The existing tools are written that way at least, and I think it is a good approach. Another option that has been mentioned is to trap the import errors in the tests themselves. The desire is that nose not be required for deployment, only for testing, and that is a good point.
Ran manage.py test.