§
    Ètºfa  ã                   ó‚   — d Z ddlmZ ddlmZ ddlmZ  G d„ de¦  «        Z G d„ d	e¦  «        Z	 G d
„ de¦  «        Z
dS )z!
Tests for hyperlink.test.common
é    )ÚAny)ÚTestCaseé   )ÚHyperlinkTestCasec                   ó   — e Zd ZdZdS )Ú_ExpectedExceptionú9An exception used to test HyperlinkTestCase.assertRaises.N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó    úY/var/www/surfInsights/venv3-11/lib/python3.11/site-packages/hyperlink/test/test_common.pyr   r   	   ó   € € € € € ØCÐCÐCÐCr   r   c                   ó   — e Zd ZdZdS )Ú_UnexpectedExceptionr	   Nr
   r   r   r   r   r      r   r   r   c                   ó<   — e Zd ZdZd„ Zd„ Zd„ Zd„ Zd„ Zd„ Z	d„ Z
d	S )
ÚTestHyperlinkzTests for HyperlinkTestCasec                 ó.   — t          d¦  «        | _        d S )NÚrun)r   Úhyperlink_test©Úselfs    r   ÚsetUpzTestHyperlink.setUp   s   € å/°Ñ6Ô6ˆÔÐÐr   c                 ó’   ‡— g Šˆfd„}| j                              t          |dd¬¦  «         |                      ‰dddifg¦  «         dS )z½HyperlinkTestCase.assertRaises does not raise an AssertionError
        when given a callable that, when called with the provided
        arguments, raises the expected exception.

        c                  ó@   •— ‰                      | |f¦  «         t          ‚©N)Úappendr   )ÚargsÚkwargsÚcalled_withs     €r   ÚraisesExpectedzCTestHyperlink.test_assertRaisesWithCallable.<locals>.raisesExpected!   s!   ø€ à×Ò  f˜~Ñ.Ô.Ð.Ý$Ð$r   r   T)Úkeyword)r   r%   N)r   ÚassertRaisesr   ÚassertEqual)r   r$   r#   s     @r   Útest_assertRaisesWithCallablez+TestHyperlink.test_assertRaisesWithCallable   sy   ø€ ð ˆð	%ð 	%ð 	%ð 	%ð 	%ð
 	Ô×(Ò(Ý °¸4ð 	)ñ 	
ô 	
ð 	
ð 	×Ò˜¨¨y¸$Ð.?Ð'@Ð&AÑBÔBÐBÐBÐBr   c                 óp   — d„ }	 | j                              t          |¦  «         dS # t          $ r Y dS w xY w)z‚When given a callable that raises an unexpected exception,
        HyperlinkTestCase.assertRaises raises that exception.

        c                  ó   — t           ‚r   )r   ©r!   r"   s     r   ÚdoesNotRaiseExpectedz\TestHyperlink.test_assertRaisesWithCallableUnexpectedException.<locals>.doesNotRaiseExpected2   s   € å&Ð&r   N©r   r&   r   r   )r   r,   s     r   Ú0test_assertRaisesWithCallableUnexpectedExceptionz>TestHyperlink.test_assertRaisesWithCallableUnexpectedException+   se   € ð	'ð 	'ð 	'ð	ØÔ×,Ò,Ý"Ð$8ñô ð ð ð øõ $ð 	ð 	ð 	ØˆDˆDð	øøøó   … ' §
5´5c                 óp   — d„ }	 | j                              t          |¦  «         dS # t          $ r Y dS w xY w)z�HyperlinkTestCase.assertRaises raises an AssertionError when given
        a callable that, when called, does not raise any exception.

        c                  ó   — d S r   r   r+   s     r   ÚdoesNotRaisezMTestHyperlink.test_assertRaisesWithCallableDoesNotRaise.<locals>.doesNotRaiseD   s   € àˆDr   N©r   r&   r   ÚAssertionError)r   r2   s     r   Ú)test_assertRaisesWithCallableDoesNotRaisez7TestHyperlink.test_assertRaisesWithCallableDoesNotRaise=   sX   € ð	ð 	ð 	ð	ØÔ×,Ò,Õ-?ÀÑNÔNÐNÐNÐNøÝð 	ð 	ð 	ØˆDˆDð	øøør/   c                 óÄ   — | j                              t          ¦  «        5 }t          ‚# 1 swxY w Y   |                      t	          |j        t          ¦  «        ¦  «         dS )a  HyperlinkTestCase.assertRaises does not raise an AssertionError
        when used as a context manager with a suite that raises the
        expected exception.  The context manager stores the exception
        instance under its `exception` instance variable.

        N)r   r&   r   Ú
assertTrueÚ
isinstanceÚ	exception)r   Úcms     r   Útest_assertRaisesContextManagerz-TestHyperlink.test_assertRaisesContextManagerM   sƒ   € ð Ô ×-Ò-Õ.@ÑAÔAð 	%ÀRÝ$Ð$ð	%ð 	%ð 	%ð 	%øøøð 	%ð 	%ð 	%ð 	%ð 	�ŠÝ�r”|Õ%7Ñ8Ô8ñ	
ô 	
ð 	
ð 	
ð 	
s    (¨,¯,c                 óŽ   — 	 | j                              t          ¦  «        5  t          ‚# 1 swxY w Y   dS # t          $ r Y dS w xY w)z«When used as a context manager with a block that raises an
        unexpected exception, HyperlinkTestCase.assertRaises raises
        that unexpected exception.

        Nr-   r   s    r   Ú2test_assertRaisesContextManagerUnexpectedExceptionz@TestHyperlink.test_assertRaisesContextManagerUnexpectedException\   sƒ   € ð	ØÔ$×1Ò1Õ2DÑEÔEð +ð +Ý*Ð*ð+ð +ð +ð +øøøð +ð +ð +ð +ð +ð +øå#ð 	ð 	ð 	ØˆDˆDð	øøøs#   ‚6 ¡)©-­6 °-±6 ¶
AÁAc                 óœ   — 	 | j                              t          ¦  «        5  	 ddd¦  «         dS # 1 swxY w Y   dS # t          $ r Y dS w xY w)z HyperlinkTestcase.assertRaises raises an AssertionError when used
        as a context manager with a block that does not raise any
        exception.

        Nr3   r   s    r   Ú+test_assertRaisesContextManagerDoesNotRaisez9TestHyperlink.test_assertRaisesContextManagerDoesNotRaisei   s¨   € ð	ØÔ$×1Ò1Õ2DÑEÔEð ð Øðð ð ñ ô ð ð ð ð ð ð ð øøøð ð ð ð ð ð øåð 	ð 	ð 	ØˆDˆDð	øøøs'   ‚= ¡0£= °4´= ·4¸= ½
AÁ
AN)r   r   r   r   r   r(   r.   r5   r;   r=   r?   r   r   r   r   r      s†   € € € € € Ø%Ð%ð7ð 7ð 7ðCð Cð Cð&ð ð ð$ð ð ð 
ð 
ð 
ðð ð ðð ð ð ð r   r   N)r   Útypingr   Úunittestr   Úcommonr   Ú	Exceptionr   r   r   r   r   r   ú<module>rD      sé   ððð ð Ð Ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø %Ð %Ð %Ð %Ð %Ð %ðDð Dð Dð Dð D˜ñ Dô Dð DðDð Dð Dð Dð D˜9ñ Dô Dð Dðcð cð cð cð c�Hñ cô cð cð cð cr   