[Tutor] Import package module problem
Eike Welk
eike.welk at gmx.net
Tue May 12 16:27:39 CEST 2009
Hello Manuel!
On Tuesday 12 May 2009, mandel at themacaque.com wrote:
> I have actually rearranged my code to have such hierarchy which
> obviously works. The problem is that I want ot be able to perform
> unit tests withinn the package of the code. I keep having the
> problem
Use a test discovery program like py.test or nose. These programs
start the test scripts with the right sys.path so that they can find
their libraries.
py.test: http://codespeak.net/py/dist/test/test.html
nose: http://code.google.com/p/python-nose/
I've had similar problems with executing tests, and I have posted a
short description how to use py.test to this list.
http://www.nabble.com/testing-framework-td23196352.html
Kind regards,
Eike.
More information about the Tutor
mailing list