Module Name
Hans Nowak
hnowak at cuci.nl
Wed Aug 15 06:23:48 EDT 2001
>===== Original Message From "Kerim Borchaev" <warkid at storm.ru> =====
>so the question is : How can I implement addModule?
>def addModule(suite, module):
> __import__(module)
> suite.addTest(unittest.defaultTestLoader.loadTestsFromModule(module))
>
>doesnt execute any test. loadTestsFromModule doesn't work - and I
>can't understand why...
I have no experience with unittest, but I think that
module = __import__(module)
should work. I figure loadTestsFroModule needs a module object, rather than a
string, which is what it gets now.
HTH,
--Hans Nowak
More information about the Python-list
mailing list