Re: Making module content available in parent module

2010-11-23 Thread Ulrich Eckhardt
Steven D'Aprano wrote: > On Tue, 23 Nov 2010 11:36:05 +0100, Ulrich Eckhardt wrote: >> PS: I've been trying a few things here, and stumbled across another >> thing that could provide a solution. I can "from tests import *", but >> then all these modules will pollute my namespace. I can "import test

Re: Making module content available in parent module

2010-11-23 Thread Steven D'Aprano
On Tue, 23 Nov 2010 11:36:05 +0100, Ulrich Eckhardt wrote: > tests/ >foo.py # defines TestFoo1 and TestFoo2 >bar.py # defines TestBar1 and TestBar2 > > What I would like to do now is this: > > from tests import * > unittest.main() > > In other words, import all test files and run t

Re: Making module content available in parent module

2010-11-23 Thread Gregor Horvath
Hi, On Tue, 23 Nov 2010 11:36:05 +0100 Ulrich Eckhardt wrote: > Now, my problem is I have a directory containing test scripts which I > all want to run. I used to run them individually and manually, but > want to avoid this overhead in the future. > > tests/ >foo.py # defines TestFoo1 and

Making module content available in parent module

2010-11-23 Thread Ulrich Eckhardt
Hi! Note up front: I'm using Python2.6 still, I guess with 2.7 test discovery, I could get better results easier, right? Now, my problem is I have a directory containing test scripts which I all want to run. I used to run them individually and manually, but want to avoid this overhead in the futu