Hello Stephen! 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: > > /path/to/src/my_project > > Inside my_project: > > lib/ > test/ > my_project.rb >
> 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. http://codespeak.net/py/dist/test/ http://somethingaboutorange.com/mrl/projects/nose/0.11.1/ You could also tweak the environment variable "$PYTHONPATH" or the variable "sys.path". See section 6.1.2: http://docs.python.org/tutorial/modules.html 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. Eike. _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor