§ |<ˆj:ã ó²—dZddlZddlmZddlmZddlmZddlmZddlmZddlm Z dd lm Z dd lm Z dd l m Z dd lmZdd lmZddlmZddlmZerddlmZdeddfd„Zdeddfd„ZGd„d¦«ZGd„d¦«Zdede jfd„Zd)d„Zedd¬ ¦«d!eded"fd#„¦«Zd)d$„Z ded%ed&ed'edeeef d(„Z!dS)*zBSupport for presenting detailed information in failing assertions.éN)ÚAny)Ú Generator)ÚList)ÚOptional)Ú TYPE_CHECKING)Úrewrite)Útruncate)Úutil)Úassertstate_key)ÚConfig)Úhookimpl)ÚParser)ÚItem)ÚSessionÚparserÚreturnc óš—| d¦«}| ddddddd¬ ¦«| d d d d ¬¦«dS)NÚ debugconfigz--assertÚstoreÚ assertmode)rÚplainrÚMODEzÂControl assertion debugging tools. 'plain' performs no assertion debugging. 'rewrite' (the default) rewrites assert statements in test modules on import to provide assert expression information.)ÚactionÚdestÚchoicesÚdefaultÚmetavarÚhelpÚenable_assertion_pass_hookÚboolFzeEnables the pytest_assertion_pass hook. Make sure to delete any previously generated pyc cache files.)Útyperr)ÚgetgroupÚ addoptionÚaddini)rÚgroups úl/builddir/build/BUILD/cloudlinux-venv-1.0.12/venv/lib/python3.11/site-packages/_pytest/assertion/__init__.pyÚpytest_addoptionr's|€Ø �OŠO˜MÑ *Ô *€EØ ‡O‚OØØØ Ø$ØØð Cðñ ô ð ð ‡M‚MØ$Ø ØðHð ñôðððóÚnamescó&—|D]H}t|t¦«s1d}t| t |¦«¦«¦«‚ŒIt jD] }t|tj¦«r|}nŒ!t¦«}|j |ŽdS)a“Register one or more module names to be rewritten on import. This function will make sure that this module or all modules inside the package will get their assert statements rewritten. Thus you should make sure to call this before the module is actually imported, usually in your __init__.py if you are a plugin using a package. :param names: The module names to register. z/expected module names as *args, got {0} insteadN) Ú isinstanceÚstrÚ TypeErrorÚformatÚreprÚsysÚ meta_pathrÚAssertionRewritingHookÚDummyRewriteHookÚ mark_rewrite)r)ÚnameÚmsgÚhookÚ importhooks r&Úregister_assert_rewriter9/s©€ðð5ð5ˆÝ˜$¥Ñ$Ô$ð 5ØCˆCݘCŸJšJ¥t¨E¡{¤{Ñ3Ô3Ñ4Ô4Ð 4ð 5õ” ð(ð(ˆÝ �d�GÔ:Ñ ;Ô ;ð ØˆJØ ˆEð õ &Ñ'Ô'ˆ Ø€JÔ˜UÐ#Ð#Ð#Ð#r(có"—eZdZdZdeddfd„ZdS)r3z3A no-op import hook for when rewriting is disabled.r)rNcó—dS©N©)Úselfr)s r&r4zDummyRewriteHook.mark_rewriteLs€Ø ˆr()Ú__name__Ú __module__Ú __qualname__Ú__doc__r,r4r=r(r&r3r3Is<€€€€€Ø=Ð=ð  3ð ¨4ð ð ð ð ð ð r(r3có"—eZdZdZdeddfd„ZdS)ÚAssertionStatezState for the assertion plugin.ÚconfigrNcój—||_|jj d¦«|_d|_dS)NÚ assertion)ÚmodeÚtraceÚrootÚgetr7)r>rErHs r&Ú__init__zAssertionState.__init__Ss.€ØˆŒ Ø”\Ô&×*Ò*¨;Ñ7Ô7ˆŒ Ø>BˆŒ ˆ ˆ r()r?r@rArBr rLr=r(r&rDrDPsD€€€€€Ø)Ð)ðC˜vðC°ðCðCðCðCðCðCr(rDrEcóX‡—t‰d¦«‰jt<tj‰¦«x‰jt_}t j d|¦«‰jt  d¦«dˆfd„ }‰  |¦«|S)z?Try to install the rewrite hook, raise SystemError if it fails.rrzinstalled rewrite import hookrNc󜕗‰jtj}|�/|tjvr#tj |¦«dSdSdSr<)Ústashr r7r0r1Úremove)r7rEs €r&Úundoz install_importhook..undo`sNø€ØŒ|�OÔ,Ô1ˆØ Ð  ­¬ Ð 5Ð 5Ý ŒM× Ò  Ñ &Ô &Ð &Ð &Ð &ð Ð Ð 5Ð 5r()rN) rDrOr rr2r7r0r1ÚinsertrIÚ add_cleanup)rEr7rQs` r&Úinstall_importhookrTYs¥ø€å$2°6¸9Ñ$EÔ$E€F„L•Ñ!Ý07Ô0NÈvÑ0VÔ0VÐV€F„L•Ô!Ô&¨Ý„M×Ò˜˜DÑ!Ô!Ð!Ø „L•Ô!×'Ò'Ð(GÑHÔHÐHð'ð'ð'ð'ð'ð'ð  ×Ò�tÑÔÐØ €Kr(Úsessionrcóž—|jj td¦«}|r#|j�|j |¦«dSdSdSr<©rErOrKr r7Ú set_session©rUÚ assertstates r&Úpytest_collectionr[is\€ð”.Ô&×*Ò*­?¸DÑAÔA€KØð2Ø Ô Ð 'Ø Ô × (Ò (¨Ñ 1Ô 1Ð 1Ð 1Ð 1ð2ð2Ø 'Ð 'r(T)ÚtryfirstÚ hookwrapperÚitem)NNNc#󬇇K—‰jŠdtdtdttfˆˆfd„ }tjtjf}|t_‰jt_‰j   ¦«r*dtdtdtddfˆˆfd „ }|t_dV—|\t_t_dt_dS) aSetup the pytest_assertrepr_compare and pytest_assertion_pass hooks. The rewrite module will use util._reprcompare if it exists to use custom reporting via the pytest_assertrepr_compare hook. This sets up this custom comparison for the test. ÚleftÚrightrcó.•—‰ ‰j|||¬¦«}|D]r}|rntj|‰¦«}d„|D¦«}d |¦«}‰j d¦«dkr| dd¦«}|cSŒsdS) aJCall the pytest_assertrepr_compare hook and prepare the result. This uses the first result from the hook and then ensures the following: * Overly verbose explanations are truncated unless configured otherwise (eg. if running in verbose mode). * Embedded newlines are escaped to help util.format_explanation() later. * If the rewrite mode is used embedded %-characters are replaced to protect later % formatting. The result can be formatted by util.format_explanation() for pretty printing. ©rEÚopr`racó:—g|]}| dd¦«‘ŒS)ú z\n)Úreplace)Ú.0Úlines r&ú z@pytest_runtest_protocol..callbinrepr..“s&€ÐKÐKÐK¸$˜DŸLšL¨¨uÑ5Ô5ÐKÐKÐKr(z ~rrú%z%%N)Úpytest_assertrepr_comparerEr Útruncate_if_requiredÚjoinÚgetvaluerg)rdr`raÚ hook_resultÚnew_explÚresÚihookr^s €€r&Ú callbinreprz,pytest_runtest_protocol..callbinrepr~s¼ø€ð×5Ò5Ø”; 2¨D¸ð6ñ ô ˆ ð$ð ð ˆHØð Ý#Ô8¸À4ÑHÔH�ØKÐKÀ(ÐKÑKÔK�Ø—j’j Ñ*Ô*�Ø”;×'Ò'¨ Ñ5Ô5¸ÒBÐBØŸ+š+ c¨4Ñ0Ô0�CØ� � � ð  ðˆtr(ÚlinenoÚorigÚexplNcó:•—‰ ‰|||¬¦«dS)N)r^rurvrw)Úpytest_assertion_pass)rurvrwrsr^s €€r&Úcall_assertion_pass_hookz9pytest_runtest_protocol..call_assertion_pass_hook s'ø€Ø × 'Ò '¨T¸&ÀtÐRVÐ 'Ñ WÔ WÐ WÐ WÐ Wr() rsÚobjectrr,r Ú _reprcompareÚ_assertion_passrEÚ_configryÚ get_hookimplsÚint)r^rtÚsaved_assert_hooksrzrss` @r&Úpytest_runtest_protocolr‚ssøøèè€ð ŒJ€Eð�fð­Vð½Å¼ ðððððððõ8Ô*­DÔ,@Ð@ÐØ#…DÔØ”;…D„Là Ô"×0Ò0Ñ2Ô2ð8ð X­Sð X½ð XÅ3ð XÈ4ð Xð Xð Xð Xð Xð Xð Xð 8�Ôà €E€E€Eà.@Ñ+…DÔ•tÔ+Ø…D„L€L€Lr(cóž—|jj td¦«}|r#|j�|j d¦«dSdSdSr<rWrYs r&Úpytest_sessionfinishr„«sZ€Ø”.Ô&×*Ò*­?¸DÑAÔA€KØð/Ø Ô Ð 'Ø Ô × (Ò (¨Ñ .Ô .Ð .Ð .Ð .ð/ð/Ø 'Ð 'r(rdr`racó2—tj||||¬¦«S)Nrc)r Úassertrepr_comparercs r&rlrl²s€õ Ô "¨&°R¸dÈ%Ð PÑ PÔ PÐPr()rUrrN)"rBr0ÚtypingrrrrrÚ_pytest.assertionrr r Ú_pytest.assertion.rewriter Ú_pytest.configr r Ú_pytest.config.argparsingrÚ _pytest.nodesrÚ _pytest.mainrr'r,r9r3rDr2rTr[r‚r„rlr=r(r&úrŽs ðØHÐHØ € € € ØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐØÐÐÐÐÐØ Ð Ð Ð Ð Ð à%Ð%Ð%Ð%Ð%Ð%Ø&Ð&Ð&Ð&Ð&Ð&Ø"Ð"Ð"Ð"Ð"Ð"Ø5Ð5Ð5Ð5Ð5Ð5Ø!Ð!Ð!Ð!Ð!Ð!Ø#Ð#Ð#Ð#Ð#Ð#Ø,Ð,Ð,Ð,Ð,Ð,ØÐÐÐÐÐàð%Ø$Ð$Ð$Ð$Ð$Ð$ð˜Vð¨ððððð2$ Cð$¨Dð$ð$ð$ð$ð4 ð ð ð ð ñ ô ð ðCðCðCðCðCñCôCðCð ˜vð ¨'Ô*Hð ð ð ð ð 2ð2ð2ð2ð €�4 TÐ*Ñ*Ô*ð4 $ð4¨9Ð5EÔ+Fð4ð4ð4ñ+Ô*ð4ðn/ð/ð/ð/ðQØ ðQØðQØ#&ðQØ/2ðQà ˆd�3ŒiÔðQðQðQðQðQðQr(