Ñò
9ÝoLc @ s> d Z d Z d d k Z d d k Z d d k Z d d k Z d d k Z d d k Z d d k l Z d d k
l Z d d k l Z d e f d „ ƒ YZ
d „ Z d „ Z d
„ Z d e i f d „ ƒ YZ d
e f d „ ƒ YZ d e i f d „ ƒ YZ d e i f d „ ƒ YZ e Z e d j o e d d ƒ n d S( s
XML Test Runner for PyUnit
sU $Id: /private/python/stdlib/xmlrunner.py 16654 2007-11-12T12:46:35.368945Z srittau $iÿÿÿÿN( t StringIO( t escapet _TestInfoc B s) e Z d Z d „ Z d „ Z d „ Z RS( sO Information about a particular test.
Used by _XMLTestResult.
c C sX | i ƒ i d ƒ } d i | d ƒ | d | _ | _ | | _ d | _ d | _ d S( Nt .iÿÿÿÿ( t idt splitt joint _classt _methodt _timet Nonet _errort _failure( t selft testt timet _pieces( ( s= /usr/lib64/python2.6/site-packages/Cheetah/Tests/xmlrunner.pyt __init__ s
$ c C s” | i d h | i d 6| i d 6| i d 6ƒ | i d j o | i | d | i ƒ n | i d j o | i | d | i ƒ n | i d ƒ d S( s^ Print information about this test case in XML format to the
supplied stream.
sF t classt methodR t failuret errors
N( t writeR R R R R
t _print_errorR ( R
t stream( ( s= /usr/lib64/python2.6/site-packages/Cheetah/Tests/xmlrunner.pyt print_report' s
c C sÄ t t | d ƒ ƒ } | i d ƒ | i d | t | d t ƒ o | d i p t | d ƒ | f ƒ t ƒ } t i | d d | ƒ | i t | i
ƒ ƒ ƒ | i d | ƒ | i d ƒ d S( sA Print information from a failure or error to the supplied stream.i s
s <%s type="%s">%s
i i s
%s>
s N( R t strR t
issubclasst Exceptiont __name__R t tracebackt print_tbR
t getvalue( R
R t tagnameR t textt tb_stream( ( s= /usr/lib64/python2.6/site-packages/Cheetah/Tests/xmlrunner.pyR 8 s
= ( R t
__module__t __doc__R R R ( ( ( s= /usr/lib64/python2.6/site-packages/Cheetah/Tests/xmlrunner.pyR s c C s
t | | ƒ S( s2 Create a _TestInfo instance for a successful test.( R ( R R ( ( s= /usr/lib64/python2.6/site-packages/Cheetah/Tests/xmlrunner.pyt create_successE s c C s t | | ƒ } | | _ | S( s. Create a _TestInfo instance for a failed test.( R R ( R R R t info( ( s= /usr/lib64/python2.6/site-packages/Cheetah/Tests/xmlrunner.pyt create_failureI s c C s t | | ƒ } | | _ | S( s2 Create a _TestInfo instance for an erroneous test.( R R ( R R R R' ( ( s= /usr/lib64/python2.6/site-packages/Cheetah/Tests/xmlrunner.pyt create_errorO s t _XMLTestResultc B sD e Z d Z d „ Z d „ Z d „ Z d „ Z d „ Z d „ Z RS( sP A test result class that stores result as XML.
Used by XMLTestRunner.
c C sA t i i | ƒ | | _ d | _ g | _ d | _ d | _ d S( N( t unittestt
TestResultR t
_test_nameR
t _start_timet _testsR R ( R
t classname( ( s= /usr/lib64/python2.6/site-packages/Cheetah/Tests/xmlrunner.pyR ] s c C s8 t i i | | ƒ d | _ d | _ t i ƒ | _ d S( N( R+ R, t startTestR
R R R R. ( R
R ( ( s= /usr/lib64/python2.6/site-packages/Cheetah/Tests/xmlrunner.pyR1 e s c C s t i ƒ | i } t i i | | ƒ | i o t | | | i ƒ } n3 | i o t | | | i ƒ } n t | | ƒ } | i
i | ƒ d S( N( R R. R+ R, t stopTestR R) R R( R&