
    1hh                     f    S SK JrJr   " S S5      r " S S5      r " S S5      r " S S	\5      rg
)    )copysignisnanc                   d    \ rS rSrSS jrSS jrSS jrSS jrSS jrSS jr	SS	 jr
SS
 jrSrg)ExtraAssertions   Nc                 x    [        X5      (       a  g U< SU< 3nU R                  U R                  X45      5        g )Nz is not a subclass of 
issubclassfail_formatMessageselfcls
superclassmsgstandardMsgs        >/opt/python-3.13.8/usr/lib/python3.13/test/support/testcase.pyassertIsSubclass ExtraAssertions.assertIsSubclass   s8    c&&5j^D		$%%c78    c                 x    [        X5      (       d  g U< SU< 3nU R                  U R                  X45      5        g )Nz is a subclass of r	   r   s        r   assertNotIsSubclass#ExtraAssertions.assertNotIsSubclass   s8    #**1*@		$%%c78r   c                 Z   [        X5      (       d  [        U[        R                  5      (       a  SUR                  < SU< 3nOF[        U[
        5      (       a  SUR                  < SU< 3nO[        U5      R                  < SU< 3nU R                  U R                  X45      5        g g )Nmodule z has no attribute type object z object has no attribute hasattr
isinstancetypes
ModuleType__name__typer   r   r   objnamer   r   s        r   assertHasAttrExtraAssertions.assertHasAttr   s    s!!#u//00 ''77I$RC&& ,S\\,<<NthW!%c!3!3 66OPTxXIId))#;< "r   c                 Z   [        X5      (       a  [        U[        R                  5      (       a  SUR                  < SU< 3nOF[        U[
        5      (       a  SUR                  < SU< 3nO[        U5      R                  < SU< 3nU R                  U R                  X45      5        g g )Nr   z has unexpected attribute r   z! object has unexpected attribute r   r$   s        r   assertNotHasAttr ExtraAssertions.assertNotHasAttr   s    3#u//00 ''77QRVQYZC&& ,S\\,<<VW[V^_!%c!3!3 66WX\W_`IId))#;< r   c                     UR                  U5      (       a  g U< SU< 3nU R                  U R                  X45      5        g )Nz doesn't start with 
startswithr   r   )r   sprefixr   r   s        r   assertStartsWith ExtraAssertions.assertStartsWith&   s<    <<1&<		$%%c78r   c                     UR                  U5      (       d  g U R                  U R                  X1< SU< 35      5        g )Nz starts with r-   )r   r/   r0   r   s       r   assertNotStartsWith#ExtraAssertions.assertNotStartsWith,   s6    ||F##		$%%cU-z+JKLr   c                     UR                  U5      (       a  g U< SU< 3nU R                  U R                  X45      5        g )Nz doesn't end with endswithr   r   )r   r/   suffixr   r   s        r   assertEndsWithExtraAssertions.assertEndsWith1   s<    ::f/z:		$%%c78r   c                     UR                  U5      (       d  g U R                  U R                  X1< SU< 35      5        g )Nz ends with r7   )r   r/   r9   r   s       r   assertNotEndsWith!ExtraAssertions.assertNotEndsWith7   s6    zz&!!		$%%cU+fZ+HIJr    N)r"   
__module____qualname____firstlineno__r   r   r'   r*   r1   r4   r:   r=   __static_attributes__r?   r   r   r   r      s,    99==9M
9Kr   r   c                       \ rS rSrS rSrg)ExceptionIsLikeMixin=   c                 r   Uc  Uc  g Uc  U R                  SU 35        Uc  U R                  SU< S35        [        U[        5      (       dS  U R                  UR                  UR                  5        U R                  UR
                  S   UR
                  S   5        g U R                  UR                  UR                  5        U R                  [        UR                  5      [        UR                  5      5        [        UR                  UR                  5       H  u  p4U R                  X45        M     g )Nzunexpected exception: zexpected an exception like z
, got Noner   )r   r   ExceptionGroupassertEqual	__class__argsmessagelen
exceptionszipassertExceptionIsLike)r   exctemplateets        r   rQ   *ExceptionIsLikeMixin.assertExceptionIsLike>   s     ;8+II.se45;II3H<zJK#~..S]]H,>,>?SXXa[(--*:;S[[(*:*:;S0#h6I6I2JKCNNH,?,?@**10 Ar   r?   N)r"   rA   rB   rC   rQ   rD   r?   r   r   rF   rF   =   s    1r   rF   c                       \ rS rSrS rSrg)FloatsAreIdenticalMixinX   c                 $   Sn[        U5      (       d  [        U5      (       a"  [        U5      (       a  [        U5      (       a  g O,X:X  a'  US:w  a  g [        SU5      [        SU5      :X  a  g US-  nU R                  UR                  X5      5        g )Nz&floats {!r} and {!r} are not identicalg        g      ?z: zeros have different signs)r   r   r   format)r   xyr   s       r   assertFloatsAreIdentical0FloatsAreIdenticalMixin.assertFloatsAreIdenticalY   sw     788uQxxQxxE!HHVCx#q!Xc1%5555		#**Q"#r   r?   N)r"   rA   rB   rC   r^   rD   r?   r   r   rX   rX   X   s    $r   rX   c                       \ rS rSrS rSrg)ComplexesAreIdenticalMixinq   c                     U R                  UR                  UR                  5        U R                  UR                  UR                  5        g r@   )r^   realimag)r   r\   r]   s      r   assertComplexesAreIdentical6ComplexesAreIdenticalMixin.assertComplexesAreIdenticalr   s4     	%%affaff5%%affaff5r   r?   N)r"   rA   rB   rC   rf   rD   r?   r   r   ra   ra   q   s    6r   ra   N)mathr   r   r   rF   rX   ra   r?   r   r   <module>ri      s6     6K 6Kr1 16$ $2	6!8 	6r   