[TIP] Testing dependencies
arufuredosan at gmail.com
Sun Sep 6 11:55:31 PDT 2009
I am currently working in a small project that has a couple of dependencies.
The problem is I do not need them directly (no need to import them at any
point) because I call those dependencies with subprocess.Popen
My current approach is to try an import anyway and fail with an error
message if it could not import the module:
except Exception, e:
print "DependencyError: %s" % e
Is it better to put this within the tests directory along with the other
Or maybe have them in both places: one in the main source code and the other
one in the tests directory?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the testing-in-python