| Server IP : 74.208.250.37 / Your IP : 216.73.216.114 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ubuntu 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64 User : miferval ( 1000) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /lib/python3/dist-packages/hyperlink/test/__pycache__/ |
Upload File : |
�
G�_� � �T � d dl mZmZmZmZ d dlmZ G d� de� Z G d� de� Z y)� )�Any�Callable�Optional�Type)�TestCasec � � e Zd ZdZ dd�Zy)�HyperlinkTestCaseznThis type mostly exists to provide a backwards-compatible
assertRaises method for Python 2.6 testing.
Nc �b � t || � }|�|S |5 ||i |�� ddd� y# 1 sw Y yxY w)a� Fail unless an exception of class expected_exception is raised
by callableObj when invoked with arguments args and keyword
arguments kwargs. If a different type of exception is
raised, it will not be caught, and the test case will be
deemed to have suffered an error, exactly as for an
unexpected exception.
If called with callableObj omitted or None, will return a
context object used like this::
with self.assertRaises(SomeException):
do_something()
The context manager keeps a reference to the exception as
the 'exception' attribute. This allows you to inspect the
exception after the assertion::
with self.assertRaises(SomeException) as cm:
do_something()
the_exception = cm.exception
self.assertEqual(the_exception.error_code, 3)
N)�_AssertRaisesContext)�self�expected_exception�callableObj�args�kwargs�contexts �7/usr/lib/python3/dist-packages/hyperlink/test/common.py�assertRaiseszHyperlinkTestCase.assertRaises
sA � �<