HEX
Server: nginx/1.24.0
System: Linux localhost 5.15.0-46-generic #49-Ubuntu SMP Thu Aug 4 18:03:25 UTC 2022 x86_64
User: www (1000)
PHP: 8.3.27
Disabled: passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,imap_open,apache_setenv
Upload Files
File: //usr/lib/python3/dist-packages/hyperlink/test/__pycache__/test_common.cpython-310.pyc
o

G�_a�@s\dZddlmZddlmZddlmZGdd�de�ZGdd	�d	e�Z	Gd
d�de�Z
dS)
z!
Tests for hyperlink.test.common
�)�Any)�TestCase�)�HyperlinkTestCasec@�eZdZdZdS)�_ExpectedException�9An exception used to test HyperlinkTestCase.assertRaises.N��__name__�
__module__�__qualname__�__doc__�rr�</usr/lib/python3/dist-packages/hyperlink/test/test_common.pyr	�rc@r)�_UnexpectedExceptionrNr	rrrrr
rrc@sHeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)�
TestHyperlinkzTests for HyperlinkTestCasecCstd�|_dS)N�run)r�hyperlink_test��selfrrr�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��N)�appendr��args�kwargs�Zcalled_withrr�raisesExpected!szCTestHyperlink.test_assertRaisesWithCallable.<locals>.raisesExpectedrT)�keyword)rrN)r�assertRaisesrZassertEqual)rrrrr�test_assertRaisesWithCallables�z+TestHyperlink.test_assertRaisesWithCallablecC�2dd�}z
|j�t|�WdStyYdSw)z�When given a callable that raises an unexpected exception,
        HyperlinkTestCase.assertRaises raises that exception.

        c_st�r)rrrrr�doesNotRaiseExpected2�z\TestHyperlink.test_assertRaisesWithCallableUnexpectedException.<locals>.doesNotRaiseExpectedN�rr rr)rr#rrr�0test_assertRaisesWithCallableUnexpectedException+s
��z>TestHyperlink.test_assertRaisesWithCallableUnexpectedExceptioncCr")z�HyperlinkTestCase.assertRaises raises an AssertionError when given
        a callable that, when called, does not raise any exception.

        c_sdSrrrrrr�doesNotRaiseDr$zMTestHyperlink.test_assertRaisesWithCallableDoesNotRaise.<locals>.doesNotRaiseN�rr r�AssertionError)rr'rrr�)test_assertRaisesWithCallableDoesNotRaise=s�z7TestHyperlink.test_assertRaisesWithCallableDoesNotRaisecCs8|j�t��}t�1swY|�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)rr rZ
assertTrue�
isinstanceZ	exception)r�cmrrr�test_assertRaisesContextManagerMs�
�z-TestHyperlink.test_assertRaisesContextManagercCs>z|j�t��t�1s
wYWdStyYdSw)z�When used as a context manager with a block that raises an
        unexpected exception, HyperlinkTestCase.assertRaises raises
        that unexpected exception.

        Nr%rrrr�2test_assertRaisesContextManagerUnexpectedException\s��z@TestHyperlink.test_assertRaisesContextManagerUnexpectedExceptioncCsLz|j�t��
Wd�WdS1swYWdSty%YdSw)z�HyperlinkTestcase.assertRaises raises an AssertionError when used
        as a context manager with a block that does not raise any
        exception.

        Nr(rrrr�+test_assertRaisesContextManagerDoesNotRaiseis&��z9TestHyperlink.test_assertRaisesContextManagerDoesNotRaiseN)r
rrr
rr!r&r*r-r.r/rrrrrs
rN)r
�typingrZunittestr�commonr�	Exceptionrrrrrrr�<module>s