Current Path : /usr/lib/python2.7/dist-packages/twisted/trial/test/ |
Current File : //usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyc |
[XMc @ s d d l Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z m Z d d l m Z m Z d d l m Z e d Z d e f d YZ d e f d YZ d S( iN( t implements( t reflect( t Failure( t util( t TestCaset PyUnitResultAdapter( t IReportert ITestCase( t erroneoust unittestt TestPyUnitTestCasec B sZ e Z d e j f d YZ d Z d Z e j d e d d g e _ d Z RS( t PyUnitTestc B s e Z d Z RS( c C s d S( N( ( t self( ( sH /usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyt test_pass s ( t __name__t __module__R ( ( ( sH /usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyR s c C s( | j d | _ t | j | _ d S( NR ( R t originalR t test( R ( ( sH /usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyt setUp s c s? g f d } | j j | | j | j g d S( sB Trial assumes that test cases implement visit(). c s j | d S( N( t append( R ( t log( sH /usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyt visitor( s N( R t visitt assertEqual( R R ( ( R sH /usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyt test_visit# s t categoryt messages' Test visitors deprecated in Twisted 8.0c C s' | j t | j d | j f d S( sW Tests must be callable in order to be used with Python's unittest.py. s %r is not callable.N( t assertTruet callableR ( R ( ( sH /usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyt test_callable1 s ( R R t pyunitR R R R R t suppresst DeprecationWarningR ( ( ( sH /usr/lib/python2.7/dist-packages/twisted/trial/test/test_pyunitcompat.pyR s t TestPyUnitResultc B sV e Z d Z d Z d Z d Z d Z d Z d Z d Z d Z RS( s Tests to show that PyUnitResultAdapter wraps TestResult objects from the standard library 'unittest' module in such a way as to make them usable and useful from Trial. c C sV d t f d Y} t j d } | } | j | | j | j d t d S( s The L{PyUnitResultAdapter} is only used when the result passed to C{run} does *not* provide L{IReporter}. t StubReporterc B s<