Server: appserver-7f0f8755-nginx-15961cad18524ec5a9db05f2a6a7e440
Current directory: /usr/lib/python2.7/unittest
Software: nginx/1.27.5
Shell Command
Create a new file
Upload file
File: suite.pyc
� ӫ[c @ s� d Z d d l Z d d l m Z d d l m Z e Z d � Z d e f d � � YZ d e f d � � YZ d e f d � � YZ d � Z d e f d � � YZ d S( t TestSuitei����Ni ( t case( t utilc C s t | | d � � } | � d S( Nc S s d S( N( t None( ( ( s$ /usr/lib/python2.7/unittest/suite.pyt
s ( t getattr( t parentt attrt func( ( s$ /usr/lib/python2.7/unittest/suite.pyt _call_if_exists s t BaseTestSuitec B sz e Z d Z d d � Z d � Z d � Z d � Z d Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z RS( sN A simple test suite that doesn't provide class or module shared fixtures. c C s g | _ | j | � d S( N( t _testst addTests( t selft tests( ( s$ /usr/lib/python2.7/unittest/suite.pyt __init__ s c C s d t j | j � t | � f S( Ns <%s tests=%s>( R t strclasst __class__t list( R ( ( s$ /usr/lib/python2.7/unittest/suite.pyt __repr__ s c C s, t | | j � s t St | � t | � k S( N( t isinstanceR t NotImplementedR ( R t other( ( s$ /usr/lib/python2.7/unittest/suite.pyt __eq__ s c C s | | k S( N( ( R R ( ( s$ /usr/lib/python2.7/unittest/suite.pyt __ne__ s c C s t | j � S( N( t iterR ( R ( ( s$ /usr/lib/python2.7/unittest/suite.pyt __iter__% s c C s+ d } x | D] } | | j � 7} q W| S( Ni ( t countTestCases( R t casest test( ( s$ /usr/lib/python2.7/unittest/suite.pyR ( s c C sw t | d � s- t d j t | � � � � n t | t � rc t | t j t f � rc t d � � n | j j | � d S( Nt __call__s {} is not callablesN TestCases and TestSuites must be instantiated before passing them to addTest()( t hasattrt TypeErrort formatt reprR t typet issubclassR t TestCaseR R t append( R R ( ( s$ /usr/lib/python2.7/unittest/suite.pyt addTest. s c C s@ t | t � r t d � � n x | D] } | j | � q% Wd S( Ns0 tests must be an iterable of tests, not a string( R t basestringR R' ( R R R ( ( s$ /usr/lib/python2.7/unittest/suite.pyR 8 s c C s, x% | D] } | j r Pn | | � q W| S( N( t shouldStop( R t resultR ( ( s$ /usr/lib/python2.7/unittest/suite.pyt run> s c O s | j | | � S( N( R+ ( R t argst kwds( ( s$ /usr/lib/python2.7/unittest/suite.pyR E s c C s x | D] } | j � q Wd S( s7 Run the tests without collecting errors in a TestResultN( t debug( R R ( ( s$ /usr/lib/python2.7/unittest/suite.pyR. H s ( N( t __name__t __module__t __doc__R R R R R t __hash__R R R' R R+ R R. ( ( ( s$ /usr/lib/python2.7/unittest/suite.pyR s c B sY e Z d Z e d � Z d � Z d � Z d � Z d � Z d � Z d � Z d � Z RS( s� A test suite is a composite test consisting of a number of TestCases. For use, create an instance of TestSuite, then add test case instances. When all tests have been added, the suite can be passed to a test runner, such as TextTestRunner. It will run the individual test cases in the order in which they were added, aggregating the results. When subclassing, do not forget to call the base class constructor. c C s t } t | d t � t k r. t | _ } n x� | D]� } | j rH Pn t | � r� | j | | � | j | | � | j | | � | j | _ t | j d t � s5 t | d t � r� q5 q� n | s� | | � q5 | j � q5 W| r| j d | � | j | � t | _ n | S( Nt _testRunEnteredt _classSetupFailedt _moduleSetUpFailed( t FalseR t TrueR3 R) t _isnotsuitet _tearDownPreviousClasst _handleModuleFixturet _handleClassSetUpR t _previousTestClassR. R t _handleModuleTearDown( R R* R. t topLevelR ( ( s$ /usr/lib/python2.7/unittest/suite.pyR+ X s, c C s t � } | j | t � d S( s7 Run the tests without collecting errors in a TestResultN( t _DebugResultR+ R7 ( R R. ( ( s$ /usr/lib/python2.7/unittest/suite.pyR. v s c C s! t | d d � } | j } | | k r+ d S| j r8 d St | d t � rN d Sy t | _ Wn t k rn n Xt | d d � } | d k rt | d � zo y | � Wn] t k r} t | t � r� � n t | _ t j | � } d | } | j | | | � n XWd t | d � Xn d S( NR<