[TIP] Building a unittest.TestCase from a doctest

Guido Wesdorp johnny at johnnydebris.net
Thu Dec 20 03:32:30 PST 2007

Laura Creighton wrote:
> If you download the py.test lib you will find a nice program I
> wrote to automatically convert unittests to the py.tests
I don't think this will help Titus much, but since Laura started 
plugging scripts, let me rise to the occasion and mention a conftest 
('plugin') for py.test I wrote a while ago, that allows running 
unittest.TestCases from the py.test runner:


It's a little crude still, but should work, and may be useful to 
people... I wanted to add it to the py lib already, but found that some 
of the unittest tests in the py lib (the ones in compat) fail because of 
some py.test stdout reformatting issue (need to take a better look when 
I have some time to spare) so I didn't yet - hopefully I will in the 
near future.



More information about the testing-in-python mailing list