bg ddlZejdddkr7ddlZddlZddlmZddlmZmZm Z ddl m Z dZ dZ d ZGd d e ZdSdd lmZdd l mZdS)N)) _is_coroutine)ismethod isfunction CO_COROUTINE)TestCasec|t|tjr!|j}t|tj!|SN) isinstance functoolspartialfunc)rs _/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/mock/backports.py_unwrap_partialr s:y011 9Dy011  ct|r|j}t|t|}t|sdSt |jj|zS)zReturn true if ``f`` is a function (or a method or functools.partial wrapper wrapping a function) whose code object has the given ``flag`` set in its flags.F)r__func__rrbool__code__co_flags)fflags r_has_code_flagrsaqkk  Aqkk  A  !}} 5AJ'$.///rc\t|tpt|ddtuS)z}Return true if the object is a coroutine function. Coroutine functions are defined with "async def" syntax. rN)rr getattrr)objs riscoroutinefunctionrs0 3 - - A C$ / /= @ rc>eZdZdfd ZdZdZdZd fd ZxZS) IsolatedAsyncioTestCaserunTestcft|d|_d|_dSr )super__init___asyncioTestLoop_asyncioCallsQueue)self methodName __class__s rr%z IsolatedAsyncioTestCase.__init__(s1 GG  Z ( ( ($(D !&*D # # #rcKtjx|_}|d |d{V}||J3r )asyncioQueuer' set_resultget task_done)r(futqueuequerys r_asyncioLoopRunnerz*IsolatedAsyncioTestCase._asyncioLoopRunner-sm.5moo =D #e NN4  %#iikk))))))!!!}}} %rcJ|jJtj}tj||d||_|}||||_| |dS)NT) r&r,new_event_loopset_event_loop set_debug create_future create_taskr4_asyncioCallsTaskrun_until_complete)r(loopr1s r_setupAsyncioLoopz)IsolatedAsyncioTestCase._setupAsyncioLoop5s(000)++D  "4 ( ( ( NN4 $(D !$$&&C%)%5%5d6M6Mc6R6R%S%SD "  # #C ( ( ( ( (rc|jJ|j}d|_|jd||j ||t jd|dS#t jd|wxYwr ) r&r' put_nowaitr<joinshutdown_asyncgensr,r7close)r(r=s r_tearDownAsyncioLoopz,IsolatedAsyncioTestCase._tearDownAsyncioLoop?s(444(D$(D !  # . .t 4 4 4  # #D$;$@$@$B$B C C C ''(?(?(A(ABBB&t,,, &t,,, s 'B00*CNc| t||S#|wxYwr )r>r$runrD)r(resultr*s rrFzIsolatedAsyncioTestCase.runMsZ  " " $ $ $ ,ww{{6**))++++))++++s A A")r"r ) __name__ __module__ __qualname__r%r4r>rDrF __classcell__)r*s@rr!r!&s + + + + + +  % % % ) ) )    , , , , , , , , , ,rr!)r)r!)sys version_infor,rasyncio.coroutinesrinspectrrr unittestr rrrr!rrrRs BQB&  000000::::::::::!!!!!! 0 0 0   ,,,,,,,,,,(,,,,,,,,,,b,+++++00000000r