a ze@s:ddlmZddlZGdddejZedkr6edS))generator_stopNc@seZdZddZddZdS) TestPEP479csNddfdd}|tdt|Wdn1s@0YdS)NcSstdSN StopIterationrrL/opt/bitninja-python-dojo/embedded/lib/python3.9/test/test_generator_stop.pyfsz1TestPEP479.test_stopiteration_wrapping..fc3s VdSrrrr rrg sz1TestPEP479.test_stopiteration_wrapping..gzgenerator raised StopIteration)ZassertRaisesRegex RuntimeErrornext)selfr rr rtest_stopiteration_wrappings  z&TestPEP479.test_stopiteration_wrappingc sddfdd}zt|WnTtyv}z<|t|jt|t|jt||jWYd}~nd}~00| ddS)NcSstdSrrrrrrr sz9TestPEP479.test_stopiteration_wrapping_context..fc3s VdSrrrr rrr sz9TestPEP479.test_stopiteration_wrapping_context..gzE__cause__, __context__, or __suppress_context__ were not properly set) r r ZassertIstype __cause__r __context__Z assertTrue__suppress_context__Zfail)rr excrr r#test_stopiteration_wrapping_contexts "z.TestPEP479.test_stopiteration_wrapping_contextN)__name__ __module__ __qualname__rrrrrrrs r__main__)Z __future__rZunittestZTestCaserrmainrrrrs