Running one single test...

Peter Hansen peter at engcorp.com
Fri Aug 22 14:31:16 EDT 2003


Timothy Grant wrote:
> 
> At work we use Perl and a home rolled unittesting mechanism. One of the things
> I love about That testing mechanism is that I can run one single test. In
> fact, I've configured Vim to run the current test and either tell me if it
> passes or tell me the error when it doesn't.
> 
> I'd love to do something similar with PyUnit, but I have yet to figure out how
> to run one single test.
> 
> Any help would be greatly appreciated.

>From the command line, assuming your tests are functions named testNN() in a
class called MyTestCase in a file called tests.py:

   python tests.py MyTestCase.test01

-Peter




More information about the Python-list mailing list