Unittest: how to pass information to TestCase classes?

A

AK

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.

Thanks! -ak
 

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,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top