Your IP : 216.73.216.60


Current Path : /opt/alt/python36/lib64/python3.6/test/__pycache__/
Upload File :
Current File : //opt/alt/python36/lib64/python3.6/test/__pycache__/test_generator_stop.cpython-36.opt-2.pyc

3

��2a��@s:ddlmZddlZGdd�dej�Zedkr6ej�dS)�)�generator_stopNc@seZdZdd�Zdd�ZdS)�
TestPEP479c	s:dd���fdd�}|jtd��t|��WdQRXdS)NcSst�dS)N)�
StopIteration�rr�8/opt/alt/python36/lib64/python3.6/test_generator_stop.py�fsz1TestPEP479.test_stopiteration_wrapping.<locals>.fc3s��VdS)Nrr)rrr�g
sz1TestPEP479.test_stopiteration_wrapping.<locals>.gzgenerator raised StopIteration)ZassertRaisesRegex�RuntimeError�next)�selfrr)rr�test_stopiteration_wrappings
z&TestPEP479.test_stopiteration_wrappingcs�dd���fdd�}yt|��WnRtk
rt}z6|jt|j�t�|jt|j�t�|j|j�WYdd}~XnX|j	d�dS)NcSst�dS)N)rrrrrrsz9TestPEP479.test_stopiteration_wrapping_context.<locals>.fc3s��VdS)Nrr)rrrrsz9TestPEP479.test_stopiteration_wrapping_context.<locals>.gzE__cause__, __context__, or __suppress_context__ were not properly set)
r
r	ZassertIs�type�	__cause__r�__context__Z
assertTrue�__suppress_context__Zfail)rr�excr)rr�#test_stopiteration_wrapping_contextsz.TestPEP479.test_stopiteration_wrapping_contextN)�__name__�
__module__�__qualname__rrrrrrrs	r�__main__)Z
__future__rZunittestZTestCaserr�mainrrrr�<module>s