py.test and HTML output

Paul McGuire ptmcg at austin.rr._bogus_.com
Tue Sep 19 16:00:58 EDT 2006


"Victor Ng" <crankycoder at gmail.com> wrote in message 
news:mailman.294.1158695142.10491.python-list at python.org...
> Is there documentation anywhere on how to get py.test to emit nice
> HTML output like the kind that they have for the PyPy project here:
> http://codespeak.net/~hpk/pypy-testresult/ ?
>
> Should I just redirect the stdout to a StringIO and parse the output
> and generate the HTML myself?  I see that there's a htmlreport.py in
> pypy, but I'm not sure how to use it.
>

At PyCon in February, there was a presentation (lightning talk perhaps?) of 
HTMLTestRunner (http://tungwaiyip.info/software/), that sounds like it does 
much as you want.  It took me about 3 minutes to integrate with my pyparsing 
unit tests, and it is a lot neater-looking than the unittest module's 
TextTestRunner.

-- Paul





More information about the Python-list mailing list