bg dZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl m Z ddl m Z ddl mZddlmZddlmZddlmZdd lmZdd lmZdd lmZdd lmZdd lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlm Z ddl!Z!ddl!m"Z"ddl!m#Z#ddl$m%Z%ddl$m&Z&ddl'm(Z(ddl'm)Z)ddl'm*Z*ddl+m,Z,ddl-m.Z.ddl/m0Z0dd l/m1Z1dd!l/m2Z2dd"l/m3Z3dd#l/m4Z4dd$l/m5Z5dd%l/m6Z6dd&l/m7Z7dd'l/m8Z8dd(l/m9Z9dd)l/m:Z:dd*l/m;Z;dd+l/mm?Z?dd.l>m@Z@dd/l>mAZAdd0lBmCZCdd1lDmEZEdd2lDmFZFdd3lDmGZGdd4lHmIZIdd5lJmKZKdd6lLmMZMdd7lLmNZNdd8lOmPZPdd9lOmQZQdd:lOmRZRdd;lOmSZSddlWmXZXdd?lWmYZYdd@lWmZZZddAlWm[Z[ddBlWm\Z\ddClWm]Z]ddDl^m_Z_ddEl`maZaddFl`mbZbddGl`mcZcer ddHldmeZeddIl^mfZfee!jgjhZidJeCdKdfdLZjdMe?dKee eke@ffdNZlddQZmdMe?dKdfdRZndSeodKdfdTZpeAdUVdWdXdKeeqfdYZrdZed[e#jsdKed\fd]Ztd^ed_eeodKeufd`ZvdaedKd\fdbZweAdUVdce dddeeodfeqdKe de#jxe#jsee e#jxe#jsfffdgZyGdhdie#jzZ{GdjdkZ|e}~e}eejdlhdmee|ee|Z[|Gdndoe{e#jsZGdpd\e#jeZGdqdreZddsZdfeqdteeodKeeqfduZGdvdweZGdxdyZdeeodKeqfdzZdfeqdKeufd{ZdfeqdKeufd|Ze2ejdU}Gd~dZe2ejdU}GddZe2GddPZdeeodeeoee"jeqfde eueeofdKe_fdZde eoefdMee?dKeofdZdKeofdZdZdMe?deKdKdfdZdMe?dKe eke@ffdZdMe?deKdKdfdZdde,deodeodKdfdZGddXe{e#jxZGddeZdS)z7Python test discovery, setup and run of test functions.N)Counter) defaultdict)partial)Path)Any)Callable)Dict) Generator)Iterable)Iterator)List)Mapping)Optional)Pattern)Sequence)Set)Tuple) TYPE_CHECKING)Union)fixtures)nodes)filter_traceback) getfslineno) ExceptionInfo) TerminalRepr) Traceback)TerminalWriter)saferepr) ascii_escaped) assert_never)final)get_default_arg_names) get_real_func) getimfunc) getlocation)is_async_function) is_generator) LEGACY_PATH)NOTSET safe_getattr) safe_isclass) STRING_TYPES)Config)ExitCode)hookimpl)Parser)check_ispytest)INSTANCE_COLLECTOR)NOSE_SUPPORT_METHOD)FuncFixtureInfo)Session)MARK_GEN) ParameterSet)get_unpacked_marks)Mark) MarkDecorator)normalize_mark_list)fail)skip) bestrelpath fnmatch_ex) import_path)ImportPathMismatchError)parts)visit)Scope)PytestCollectionWarning)PytestReturnNotNoneWarning)PytestUnhandledCoroutineWarning)Literal) _ScopeNameparserreturncj|d}|dddddd|d dd dd |d d ddgd|dd dgd|dd dgd|dddddS)Ngeneralz --fixturesz --funcargs store_true showfixturesFziShow available fixtures, sorted by plugin appearance (fixtures with leading '_' are only shown with '-v'))actiondestdefaulthelpz--fixtures-per-testshow_fixtures_per_testzShow fixtures per test python_filesargsz test_*.pyz *_test.pyz9Glob-style file patterns for Python test module discovery)typerTrUpython_classesTestz6Prefixes or glob names for Python test class discoverypython_functionstestzDPrefixes or glob names for Python test function and method discoveryDdisable_test_id_escaping_and_forfeit_all_rights_to_community_supportboolzcDisable string escape non-ASCII characters, might cause unwanted side effects(use at your own risk))getgroup addoptionaddini)rLgroups _/builddir/build/BUILD/cloudlinux-venv-1.0.7/venv/lib/python3.11/site-packages/_pytest/python.pypytest_addoptionre\s' OOI & &E OO ?  OO % %  MM k* H  MM  E   MM  S   MMN - configcz|jjrt|dS|jjrt|dSdS)Nr)optionrQrVrgs rdpytest_cmdline_mainrksG }!Vq }+v&&&q 4rfmetafuncMetafunccx|jdD]}|j|ji|jd|idS)N parametrizename _param_mark) definition iter_markersrorXkwargs)rlmarkers rdpytest_generate_testsrws]%22 2FFPPfkOV]OOOOOOOPPrfc^|dd|dddS)Nmarkersaparametrize(argnames, argvalues): call a test function multiple times passing in different arguments in turn. argvalues generally needs to be a list of values if argnames specifies only one name or a list of tuples of values if argnames specifies multiple names. Example: @parametrize('arg1', [1,2]) would lead to two calls of the decorated test function, one with arg1=1 and another with arg1=2.see https://docs.pytest.org/en/stable/how-to/parametrize.html for more info and examples.zusefixtures(fixturename1, fixturename2, ...): mark tests as needing all of the specified fixtures. see https://docs.pytest.org/en/stable/explanation/fixtures.html#usefixtures )addinivalue_linerjs rdpytest_configurer{sO       Srfnodeidcd}|dz }|dz }|dz }|dz }|dz }|dz }tjt||t d dS) NzFasync def functions are not natively supported and have been skipped. zMYou need to install a suitable plugin for your async framework, for example: z - anyio z - pytest-asyncio z - pytest-tornasync z - pytest-trio z - pytest-twistedz?async def function and no async plugin installed (see warnings))reason)warningswarnrIformatr>)r|msgs rdasync_warn_and_skiprs SCXC=C !!C ##C C C M1#**V2D2DEEFFFQRRRRRRrfT)trylast pyfuncitemFunctionc r|j}t|rt|j|jfd|jjD}|di|}t|dst|drt|jn/|-tj td|jd|ddS) Nc"i|] }|| Sr).0argfuncargss rd z&pytest_pyfunc_call..sOOOsXc]OOOrf __await__ __aiter__zExpected None, but z returned zj, which will be an error in a future version of pytest. Did you mean to use `assert` instead of `return`?Tr) objr&rr|r _fixtureinfoargnameshasattrrrrH)r testfunctiontestargsresultrs @rdpytest_pyfunc_callrs>L&&/J-..."HOOOOj.E.NOOOH \ % %H % %Fv{## wv{'C'C J-....   &_j&7__6___     4rf file_pathparentModulec|jdkr{|j|s.t||jddgzsdS|j|}|||}|SdS)Nz.pyrW __init__.py) module_pathr)suffixsession isinitpathpath_matches_patternsrggetini gethookproxypytest_pycollect_makemodule)rrihookmodules rdpytest_collect_filers5  ~((33 (6=//??=/Q t++I66::!&;   4rfpathpatternsc:tfd|DS)zKReturn whether path matches any of the patterns in the list of globs given.c38K|]}t|VdSNr@)rpatternrs rd z(path_matches_patterns..s-AAWz'4((AAAAAArf)any)rrs` rdrrs& AAAAAAA A AArfrc|jdkrt||}|St||}|S)Nrr)rqPackage from_parentr)rrpkgmods rdrrsJ=((**6 *DD $$V+$>>C Jrf collector)rClassrqrct|ttfsJt|t |r7|||rt|||}|Snj|||rSt|d|}tj |sltj t|sKt|\}}tjtd|zdt!||dznt|ddrt#|rt$||}d |}|t+jd | |t||St1|||SdS) N)rqr__func__z/cannot collect %r because it is not a function.)messagecategoryfilenamelineno__test__Trpz?yield tests were removed in pytest 4.0 - {name} will be ignoredF)runr~) isinstancerrrYr, istestclassristestfunctiongetattrinspect isfunctionr#rr warn_explicitrGstrr'rr add_markerr7xfailrlist _genfunctions)rrqrklassrrresr~s rdpytest_pycollect_makeitemrs i% 1 1BB4 ??BB 1C@  d + +  ,,YTs,KKEL   ! !#t , ,@c:s++"3'' @7+=mC>P>P+Q+Q @*3// Hf  "/ELXz      S*d + + @C  @ ( 4 4YT 4 J JZaabx~%GGGHHH088999 I33D#>>??? 4rfceZdZdZdZedZedZedZedZ e j dZ dZ dd e d e d e fd Zd eede feee ffdZdS) PyobjMixinzthis mix-in inherits from Node to carry over the typing information as its intended to always mix in before a node its position in the mro is unaffectedTcL|t}||jndS)z@Python module object this node was collected from (can be None).N) getparentrrselfnodes rdrzPyobjMixin.modules&~~f%%+txx5rfcL|t}||jndS)z?Python class object this node was collected from (can be None).N)rrrrs rdclszPyobjMixin.cls!s&~~e$$+txx5rfcj|t}|t|jddndS)zPython instance object the function is bound to. Returns None if not a test method, e.g. for a standalone test function, a staticmethod, a class or a module. N__self__)rrrrrs rdinstancezPyobjMixin.instance's3~~h''6:6FwtxT222DPrfct|dd}|w|x|_}|jrU|jt |j|j d|jD|S)zUnderlying Python object._objNc3(K|] }|j|fVdSrrprmarks rdrz!PyobjMixin.obj..=s)$T$T4di%6$T$T$T$T$T$Trf) r_getobjr_ALLOW_MARKERS own_markersextendr9rkeywordsupdaterrs rdrzPyobjMixin.obj1sdFD)) ;"llnn ,DI" U ''(:48(D(DEEE $$$T$T4CS$T$T$TTTT rfc||_dSr)r)rvalues rdrzPyobjMixin.obj@s  rfcV|jJ|jj}t||jS)zCGet the underlying Python object. May be overwritten by subclasses.)rrrrqrs rdrzPyobjMixin._getobjDs-{&&&kosDI&&&rfF stopatmodule includemodulerMcv|}|g}|D]i}|j}t|tr;t j|d}|r|r|j|n|j|j|jd |S)z5Return Python path relative to the containing module.r.) listchainreverserqrrosrsplitextappendjoin)rrrchainrDrrqs rd getmodpathzPyobjMixin.getmodpathKs     D9D$'' w''--a0$+$ T***E EL     xxrfzos.PathLike[str]ch|j}t|dd}t|trDtj|jj}|J|dr |dd}|}|}nt|\}}| }t|tsJ|||fS)Ncompat_co_firstlinenoz.pyc) rrrintsysmodules __module____file__endswithrr)rrrrrrmodpaths rd reportinfozPyobjMixin.reportinfo\sh '-Dd K K +S 1 1 , CN3r __cached__ __builtins__ceZdZdedefdZdedefdZdedefdZdededefdZ dededefdZ d ededefd Z de e ejejffd Zdeded fd ZdS) PyCollectorrqrMc.|d|S)Nr\_matches_prefix_or_glob_optionrrqs rdfuncnamefilterzPyCollector.funcnamefilters223EtLLLrfrc(t|ddduS)zgLook for the __test__ attribute, which is applied by the @nose.tools.istest decorator. rFTr*rs rd isnosetestzPyCollector.isnosetestsCU33t;;rfc.|d|S)NrZrrs rdclassnamefilterzPyCollector.classnamefilters223CTJJJrfc||s||rRt|ttfrt |dd}t |otj|duSdS)NrF) rrr staticmethod classmethodr+callablergetfixturemarkerrrrqs rdrzPyCollector.istestfunctionsy   t $ $ (<(< # k:;; ;"3 E::C==KX%>s%C%Ct%K K5rfcV||p||Sr)rrrs rdrzPyCollector.istestclasss'##D))AT__S-A-AArf option_namec|j|D]>}||rdSd|vsd|vsd|vrtj||rdS?dS)z`Check if the given name matches the prefix or glob-pattern defined in ini configuration.T*?[F)rgr startswithfnmatch)rrrqris rdrz*PyCollector._matches_prefix_or_glob_optionsk((55  Fv&& tt--3&==C6MMwfHHMtturfct|jddsgSt|jdig}t|jtr)|jjD]}||jt}g}|j}|D]}g}t| D]\}} |tvr||vr| || ||| } | Dt| tr|| o|| ||g} t|D]}| || S)NrT__dict__)rrqr)rrrrY__mro__rr&setrritemsIGNORED_ATTRIBUTESaddrrreversed) rdictsbaseclsseen dict_valuesrdicvaluesrqrrrs rdcollectzPyCollector.collectstxT22 I:r223 dh % % /8+ / / W-....FH   ' 'C?AF"#))++.. ' ' c---4<<55"36;T**'MM#&&&&MM#&&&&   v & & & &{++ " "F MM& ! ! ! ! rfrc #rK|t}|J|j}|t}|r|jpd}t|||}|j}t|||j||d} g} t|dr| |j |2t|dr"| |j |j j | t| | js!t |||VdS|jj} t'j|| | || jD]8} |d| jd} t || | || jdi| V9dS) N)rqcallobjT)rs fixtureinforgrr _ispytestrw)rl)rqr6r"])rqcallspecr6r originalname)rrrrFunctionDefinitionrrrmrgrrrwr call_extradict_callsrr_fixturemanagerradd_funcarg_pseudo_fixture_defprune_dependency_treeid)rrqfuncobj modulecolrclscolrrsr6rlmethodsfmr9subnames rdrzPyCollector._genfunctionssNN6** $$$&&#+t'33DtW3UU  - !#;     62 3 3 9 NN67 8 8 8 ?ws,CDD? NN33556 7 7 7 (33GT8=T=T=TUUU &&t$K&PP P P P P P-B  3D(B G G G  - - / / /$O  !22HK222** % +&k40!% +  rfN)rrrrr_robjectrrrrrr rrItem Collectorr3r rrrfrdr r s^M3M4MMMM