Sindbad~EG File Manager
�
'Μg� � �p � d dl mZ d dlZ G d� dej � Zedk( r ej � yy)� )�generator_stopNc � � e Zd Zd� Zd� Zy)�
TestPEP479c � �� d� ��fd�}| j t d� 5 t |� � d d d � y # 1 sw Y y xY w)Nc � � t ��N��
StopIteration� � �5/usr/local/lib/python3.12/test/test_generator_stop.py�fz1TestPEP479.test_stopiteration_wrapping.<locals>.f � � ��r c 3 � �K � � � �� y �wr r �r s �r
�gz1TestPEP479.test_stopiteration_wrapping.<locals>.g
� �� �� ��#�I�� �zgenerator raised StopIteration)�assertRaisesRegex�RuntimeError�next)�selfr r s @r
�test_stopiteration_wrappingz&TestPEP479.test_stopiteration_wrapping s= �� � � �
�
#�
#�L�$D�F����I�F� F� F�s �:�Ac �` �� d� ��fd�} t |� � | j d� y # t $ rw}| j t |j
� t � | j t |j � t � | j |j � Y d }~y d }~ww xY w)Nc � � t �r r r r r
r z9TestPEP479.test_stopiteration_wrapping_context.<locals>.f r r c 3 � �K � � � �� y �wr r r s �r
r z9TestPEP479.test_stopiteration_wrapping_context.<locals>.g r r zE__cause__, __context__, or __suppress_context__ were not properly set)
r �failr �assertIs�type� __cause__r
�__context__�
assertTrue�__suppress_context__)r r �excr s @r
�#test_stopiteration_wrapping_contextz.TestPEP479.test_stopiteration_wrapping_context s� �� � � � /����I�
�I�I� .�
/�� � 6��M�M�$�s�}�}�-�}�=��M�M�$�s���/��?��O�O�C�4�4�5�5�� 6�s �- � B-�A-B(�(B-N)�__name__�
__module__�__qualname__r r% r r r
r r s � ��/r r �__main__)�
__future__r �unittest�TestCaser r&