Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Unittest: how to pass information to TestCase classes?

Reply
Thread Tools

Unittest: how to pass information to TestCase classes?

 
 
AK
Guest
Posts: n/a
 
      10-26-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.

Thanks! -ak
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Differerence between Test::Unit::TestCase and RUNIT::TestCase Scott Ruby 1 08-20-2005 08:49 PM
Create TestCase with WSAD on EJB Memi Lavi Java 0 08-05-2004 03:23 PM
Computing test methods in unittest.TestCase Jan Decaluwe Python 2 03-02-2004 06:33 PM
standard struts testcase failed ? Charlie Java 1 10-16-2003 04:58 AM



Advertisments