Sindbad~EG File Manager
�
(Μg$@ � � � 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__� � �;/usr/local/lib/python3.12/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"