[Tutor] Modules and Test Suites
eike.welk at gmx.net
Tue Dec 29 16:47:55 CET 2009
On Tuesday 29 December 2009, Stephen Nelson-Smith wrote:
> I do quite a lot of programming in Ruby. When I do so, my code
> tends to have the following layout:
> Inside my_project:
> b) If so - how can I do it in Python?
I think the test discovery programs "py.test" and "nose" do what you
want. If I understand you correctly you want something that sets the
right search path for library modules.
You could also tweak the environment variable "$PYTHONPATH" or the
See section 6.1.2:
I use "py.test" and like it. But I keep tests and libraries in the
same directory. I know however that "py.test" also supports separate
directories for tests.
More information about the Tutor