Testoob: How do you use testoob.collector_from_globals / collector_from_modules?
orip
oripel at gmail.com
Tue Jul 28 03:23:10 EDT 2009
Hi Harry,
I forwarded this to the Testoob list at http://groups.google.com/group/testoob
Ori.
On Jul 27, 4:12 pm, Harry Ebbers <neme... at gmail.com> wrote:
> 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
More information about the Python-list
mailing list