Testoob: How do you use testoob.collector_from_globals /collector_from_modules?

H

Harry Ebbers

Hi,

For a project I'm creating unittests using testoob. When all tests are
in a single file there is no problem

if __name__ == '__main__':
testoob.main()
does the trick as usual.

But for a number of python-applications they have asked me to group
unittests in different files, based on common functionality (e.g. GUI,
main-application, etcetera).

Ican get it to work by importing all unittestclasses in the following
way and than use the normal if __name__ == '__main__' construction

(from GUI import GUItests
from APP import APPtests

if __name__ == '__main__':
testoob.main())

But looking at the future I would like to use testsuites.

On the internet I found the functions testoob.collector_from_globals
and collector_from_modules which one can use to 'easily' create
testsuites which can be used with testoob. But no examples on how to
use them can be found.

Can anybody supply me with a working example?

TIA

Harry Ebbers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,780
Messages
2,569,611
Members
45,276
Latest member
Sawatmakal

Latest Threads

Top