Unittest: how to pass information to TestCase classes?
andrei.avk at gmail.com
Tue Oct 26 20:46:52 CEST 2010
Hi, I have a question about unittest: let's say I create a temp dir for
my tests, then use loadTestsFromNames() to load my tests from packages
and modules they're in, then use TextTestRunner.run() to run the tests,
how can I pass information to TestCase instances, e.g. the location of
the temp dir I created?
The dir has to be created just once, before any tests run, and then
multiple packages and multiple modules in them are imported and run.
More information about the Python-list