Your IP : 216.73.216.52


Current Path : /opt/alt/python35/lib64/python3.5/test/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/test/__pycache__/test_pep479.cpython-35.opt-1.pyc



��Yf��@sOddlmZddlZGdd�dej�ZedkrKej�dS)�)�generator_stopNc@s(eZdZdd�Zdd�ZdS)�
TestPEP479c	sIdd���fdd�}|jtd��t|��WdQRXdS)NcSs
t�dS)N)�
StopIteration�rr�5/opt/alt/python35/lib64/python3.5/test/test_pep479.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|��Wngtk
r�}zG|jt|j�t�|jt|j�t�|j|j�WYdd}~XnX|j	d�dS)NcSs
t�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