ok
Direktori : /usr/lib64/python2.7/unittest/test/ |
Current File : //usr/lib64/python2.7/unittest/test/test_assertions.pyc |
� {fc @ sg d d l Z d d l Z d e j f d � � YZ d e j f d � � YZ e d k rc e j � n d S( i����Nt Test_Assertionsc B s, e Z d � Z d � Z d � Z d � Z RS( c C sH | j d d � | j d d � | j | j | j d d � | j | j | j d d � | j d d d d �| j | j | j d d d d �| j d d d d �| j d d d d �| j | j | j d d d d �| j | j | j d d d d �| j t d � t d � � | j | j | j t d � t d � � d S( Ng�1� �?g �?g��� �?g�������?t placesi i g�������?y �������?t infy�������?�������?y�������?�������?y�������?�������?y�������?�������?( t assertAlmostEqualt assertNotAlmostEqualt assertRaisest failureExceptiont float( t self( ( s5 /usr/lib64/python2.7/unittest/test/test_assertions.pyt test_AlmostEqual s$ c C s� | j d d d d �| j d d d d �| j d d d d �| j d d d d �| j d d d d �| j | j | j d d d d �| j | j | j d d d d �| j | j | j d d d d �| j t | j d d d d d d �| j t | j d d d d d d �t j j � } | t j d d � } | j | | d t j d d � �| j | | d t j d d � �d S( Ng�������?g �?t deltag �?g�������?R i t secondsi i i ( R R R R t TypeErrort datetimet nowt timedelta( R t firstt second( ( s5 /usr/lib64/python2.7/unittest/test/test_assertions.pyt test_AmostEqualWithDelta s* c C s� d � } | j t | t � | j t | t d � � y | j t d � � Wn) | j k rw } | j d | j � n X| j d � y | j t | t � Wn t k r� n X| j d � | j t � �* } y t � Wn t k r� } � n XWd QX| j | j | � | j t � � t d � � Wd QXy | j t � � Wd QXWn) | j k rr} | j d | j � n X| j d � y | j t � � t � Wd QXWn t k r�n X| j d � d S( Nc S s | � d S( N( ( t e( ( s5 /usr/lib64/python2.7/unittest/test/test_assertions.pyt _raise: s t keyc S s d S( N( t None( ( ( s5 /usr/lib64/python2.7/unittest/test/test_assertions.pyt <lambda>? t s KeyError not raiseds assertRaises() didn't fails0 assertRaises() didn't let exception pass through( R t KeyErrorR t assertInt argst failt ValueErrort Exceptiont assertIst exception( R R R t cm( ( s5 /usr/lib64/python2.7/unittest/test/test_assertions.pyt test_assertRaises9 sB c C s | j d d � y | j d d d � WnD | j k rm } | j d | j d � | j d | j d � n X| j d � d S( Ns Ala ma kotas r+s k.tt Messages 'kot'i s* assertNotRegexpMatches should have failed.( t assertNotRegexpMatchesR R R R ( R R ( ( s5 /usr/lib64/python2.7/unittest/test/test_assertions.pyt testAssertNotRegexpMatchesb s ( t __name__t __module__R R R"