HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //lib/python3/dist-packages/hyperlink/test/__pycache__/test_common.cpython-38.pyc
U

�UYG
�@sPdZddlmZddlmZGdd�de�ZGdd�de�ZGd	d
�d
e�ZdS)z!
Tests for hyperlink.test.common
�)�TestCase�)�HyperlinkTestCasec@seZdZdZdS)�_ExpectedException�?An exception used to test HyperlinkTestCase.assertRaises.

    N��__name__�
__module__�__qualname__�__doc__�rr�</usr/lib/python3/dist-packages/hyperlink/test/test_common.pyrsrc@seZdZdZdS)�_UnexpectedExceptionrNrrrrr
rsrc@sHeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)�
TestHyperlinkzTests for HyperlinkTestCasecCstd�|_dS)N�run)r�hyperlink_test��selfrrr
�setUpszTestHyperlink.setUpcs>g��fdd�}|jjt|ddd�|��dddifg�dS)	z�HyperlinkTestCase.assertRaises does not raise an AssertionError
        when given a callable that, when called with the provided
        arguments, raises the expected exception.

        cs��||f�t�dS�N)�appendr��args�kwargs�Zcalled_withrr
�raisesExpected"szCTestHyperlink.test_assertRaisesWithCallable.<locals>.raisesExpectedrT)�keyword)rrN)r�assertRaisesrZassertEqual)rrrrr
�test_assertRaisesWithCallables�z+TestHyperlink.test_assertRaisesWithCallablecCs4dd�}z|j�t|�Wntk
r.YnXdS)z�When given a callable that raises an unexpected exception,
        HyperlinkTestCase.assertRaises raises that exception.

        c_st�dSr)rrrrr
�doesNotRaiseExpected0sz\TestHyperlink.test_assertRaisesWithCallableUnexpectedException.<locals>.doesNotRaiseExpectedN�rrrr)rrrrr
�0test_assertRaisesWithCallableUnexpectedException*s�z>TestHyperlink.test_assertRaisesWithCallableUnexpectedExceptioncCs4dd�}z|j�t|�Wntk
r.YnXdS)z�HyperlinkTestCase.assertRaises raises an AssertionError when given
        a callable that, when called, does not raise any exception.

        c_sdS)NTrrrrr
�doesNotRaise?szMTestHyperlink.test_assertRaisesWithCallableDoesNotRaise.<locals>.doesNotRaiseN�rrr�AssertionError)rr"rrr
�)test_assertRaisesWithCallableDoesNotRaise9s�z7TestHyperlink.test_assertRaisesWithCallableDoesNotRaisec	Cs2|j�t��
}t�W5QRX|�t|jt��dS)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)rrrZ
assertTrue�
isinstanceZ	exception)r�cmrrr
�test_assertRaisesContextManagerHsz-TestHyperlink.test_assertRaisesContextManagerc	Cs:z |j�t��
t�W5QRXWntk
r4YnXdS)z�When used as a context manager with a block that raises an
        unexpected exception, HyperlinkTestCase.assertRaises raises
        that unexpected exception.

        Nr rrrr
�2test_assertRaisesContextManagerUnexpectedExceptionTs
z@TestHyperlink.test_assertRaisesContextManagerUnexpectedExceptionc	Cs6z|j�t��W5QRXWntk
r0YnXdS)z�HyperlinkTestcase.assertRaises raises an AssertionError when used
        as a context manager with a block that does not raise any
        exception.

        Nr#rrrr
�+test_assertRaisesContextManagerDoesNotRaise`s
z9TestHyperlink.test_assertRaisesContextManagerDoesNotRaiseN)rr	r
rrrr!r%r(r)r*rrrr
rsrN)	rZunittestr�commonr�	Exceptionrrrrrrr
�<module>s