a  ze@sDddlZddlZddlZddZeejdGdddejZdS)NcCstddS)N)asyncioZset_event_loop_policyrrR/opt/bitninja-python-dojo/embedded/lib/python3.9/test/test_asyncio/test_context.pytearDownModulesrz,decimal is built with a thread-local contextc@seZdZddZdS)DecimalContextTestcsxddfdd}t|\}}|t|dd|t|dd|t|dd |t|dd dS) NcsvtZ}||_t|t|}t|IdHt|t|d}||fWdS1sh0YdS)N)decimalZ localcontextZprecZDecimalrsleep)tZ precisionxyctxabrrr fractionss  zGDecimalContextTest.test_asyncio_task_decimal_context..fractionscs2tddddddddIdH\}}||fS)Ng?g?)rZgather)r1r2rrrmainszBDecimalContextTest.test_asyncio_task_decimal_context..mainrz0.333rz0.111z0.333333z0.111111)rrunZ assertEqualstr)selfrrrrrr!test_asyncio_task_decimal_context s z4DecimalContextTest.test_asyncio_task_decimal_contextN)__name__ __module__ __qualname__rrrrrr sr)rrZunittestrZ skipUnlessZHAVE_CONTEXTVARZTestCaserrrrrs