| Server IP : 121.121.20.254 / Your IP : 216.73.216.202 Web Server : Microsoft-IIS/10.0 System : Windows NT WEB-SERVER 10.0 build 20348 (Windows Server 2022) AMD64 User : IUSR ( 0) PHP Version : 8.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/Python312/Lib/test/test_capi/__pycache__/ |
Upload File : |
�
���g�A � � � d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlmZ d dl m
Z
mZ d dlm
Z
d dlmZ ddlmZ ej$ d � ZdZ G d
� de� Z G d� d
ej. � Z G d� dej. � Z G d� dej. � Z G d� deej. � Zedk( r ej: � yy)� N)�support)�
import_helper)�TESTFN�TESTFN_UNDECODABLE)�assert_python_failure)�ExceptionIsLikeMixin� )�
decode_stderr� _testcapic � � e Zd Zy)�CustomErrorN��__name__�
__module__�__qualname__� � �3C:\Python312\\Lib\test\test_capi\test_exceptions.pyr
r
s � �r r
c � � e Zd Zd� Zd� Zy)�Test_Exceptionsc � � t d� }t d� } |�# t $ r�}t j � }t
j
|� }t j � }t
j
|� }t j � }| j ||� | j ||� | j ||� | j ||� | j ||� | j ||� Y d }~y d }~ww xY w)N�5�TEST)�
ValueError� TypeError�fail�sys� exceptionr �
set_exception�assertEqual) �self�raised_exception�new_exc�e�orig_sys_exception�orig_exception�new_sys_exception�
new_exception�reset_sys_exceptions r �test_exceptionzTest_Exceptions.test_exception s� � �%�c�?���F�#�� .�"�"���
?�!$�����&�4�4�W�=�N� #�
�
���%�3�3�N�C�M�"%�-�-�/�����^�Q�/����^�-=�>����/��@����0�.�A����]�G�4����.�
�>�>��
?�s � � C?�CC:�:C?c �j � t d� }t d� } |�# t $ �r}|j }t j
� }t j |j |d � }t j
� }t
j |� }t j
� } | j |d |� | j ||j ||f� | j ||� | j | |� | j ||j |d f� | j ||� Y d }~y d }~ww xY w)Nr r r )r r �
assertTrue�
__traceback__r �exc_infor �set_exc_info� __class__r �assertSequenceEqual)
r! r"