Ë
‚Ö¦i»à ã ó — d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl
Z
ddlZddlm
Z
ddlmZmZmZmZmZ dZ e« ZdZ G d„ d e« Z G d
„ de« Z G d„ d
e« Z G d„ de« Zd„ Zd„ Zd„ Zd„ Z g Z!d„ Z"d„ Z#d„ Z$d„ Z%d„ Z&d„ Z'd„ Z(d„ Z) G d„ d« Z* G d„ de*« Z+ G d „ d!e+« Z, G d"„ d#e+« Z- G d$„ d%ej\ « Z/ G d&„ d'e« Z0 G d(„ d)e0« Z1 G d*„ d+e0« Z2y),zTest case implementationé Né )Úresult)ÚstrclassÚ safe_reprÚ_count_diff_all_purposeÚ_count_diff_hashableÚ_common_shorten_reprTz@
Diff is %s characters long. Set self.maxDiff to None to see it.c ó — e Zd ZdZy)ÚSkipTestz©
Raise this exception in a test to skip it.
Usually you can use TestCase.skipTest() or one of the skipping decorators
instead of raising this directly.
N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__© ó ú&/usr/lib64/python3.12/unittest/case.pyr r s „ òr r c ó — e Zd ZdZy)Ú_ShouldStopz
The test should stop.
Nr r r r r r " ó „ òr r c ó — e Zd ZdZy)Ú_UnexpectedSuccessz7
The test was supposed to fail, but it didn't!
Nr r r r r r ' r r r c ó: — e Zd Zdd„Zej
dd„« Zy)Ú_OutcomeNc ó^ — d| _ || _ t |d« | _ d| _ d | _ y )NFÚ
addSubTestT)Úexpecting_failurer ÚhasattrÚresult_supports_subtestsÚsuccessÚexpectedFailure)Úselfr s r Ú__init__z_Outcome.__init__. s/ € Ø!&ˆÔ؈ŒÜ(/°¸Ó(EˆÔ%؈ŒØ#ˆÕr c # óŽ K — | j }d| _ d –— |r4| j r(| j j |j |d « | j xr || _ y # t $ r ‚ t
$ r1}d| _ t
| j |t |« « Y d }~ŒTd }~wt $ r Y Œb t j « }| j r|| _ nHd| _ |r(| j j |j ||« nt | j ||« d }Y Œ×xY w# | j xr || _ w xY ww)NTF)r r r Ú test_caseÚKeyboardInterruptr Ú_addSkipÚstrr ÚsysÚexc_infor r! Ú _addError)r" r% ÚsubTestÚold_successÚer* s r ÚtestPartExecutorz_Outcome.testPartExecutor5 s è ø€ à—l‘lˆØˆŒð 8Ûñ, ˜4Ÿ<š<Ø—‘×&Ñ& y×':Ñ':¸IÀtÕLàŸ<™<Ò7¨KˆD�Løô1 !ò ØÜò 5Ø ˆDŒLÜ�T—[‘[ )¬S°«V×4Ñ4ûÜò Ùð Ü—|‘|“~ˆHØ×%Ò%Ø'/�Õ$à$�”ÙØ—K‘K×*Ñ*¨9×+>Ñ+>À È8ÕTä˜dŸk™k¨9°hÔ?ð ŠHûð
Ÿ<™<Ò7¨KˆD�LüsL ‚E—A' ›6D+ ÁEÁ'D(Á9'B%Â D+ Â%D(Â1D+ Â3A3D(Ä&D+ Ä+EÅE©N)F)r
r r r# Ú
contextlibÚcontextmanagerr/ r r r r r - s! „ ó$ð ×Ñò8ó ñ8r r c ó� — t | dd « }|�
|||« y t j dt d« | j |« y )NÚaddSkipz4TestResult has no addSkip method, skips not reportedé )ÚgetattrÚwarningsÚwarnÚRuntimeWarningÚ
addSuccess)r r% Úreasonr4 s r r' r' V sD € Ü�f˜i¨Ó.€GØÐÙ� ˜6Õ"ä�
‰
ÐLÜ$ aô )àˆ×ј)Õ$r c ó� — | �D|�At |d |j « r | j ||« y | j ||« y y y )Nr )Ú
issubclassÚfailureExceptionÚ
addFailureÚaddError)r Útestr* s r r+ r+ _ sK € Ø
ИhÐ2Ü�h˜q‘k 4×#8Ñ#8Ô9؈F×јd HÕ-àˆF�O‰O˜D (Õ+ð 3Ðr c ó — | S r0 r )Úobjs r Ú_idrD f s € Ø€Jr c óÞ — t | « } |j }|j } || « } ||| d d d « |S # t $ r( t d|j
› d|j › d�« d ‚w xY w)NÚ'Ú.z6' object does not support the context manager protocol)ÚtypeÚ __enter__Ú__exit__ÚAttributeErrorÚ TypeErrorr r )ÚcmÚ
addcleanupÚclsÚenterÚexitr s r Ú_enter_contextrR j sŽ € ô ˆr‹(€CðOØ—
‘
ˆØ�|‰|ˆñ �2‹Y€FÙˆt�R˜˜t TÔ*Ø€Møô ò Oܘ!˜CŸN™NÐ+¨1¨S×-=Ñ-=Ð,>ð ?Cð Dó EØJNð OðOús �; »1A,c ó4 — t j | ||f« y)znSame as addCleanup, except the cleanup items are called even if
setUpModule fails (unlike tearDownModule).N)Ú_module_cleanupsÚappend)ÚfunctionÚargsÚkwargss r ÚaddModuleCleanuprY z s € ô ×јX t¨VÐ4Õ5r c ó" — t | t « S )z&Same as enterContext, but module-wide.)rR rY )rM s r ÚenterModuleContextr[ s € ä˜"Ô.Ó/Ð/r c óÀ — g } t r(t j « \ }}} ||i |¤Ž t rŒ(| r| d ‚y# t $ r}| j |« Y d}~Œ.d}~ww xY w)zWExecute all module cleanup functions. Normally called for you after
tearDownModule.Nr )rT ÚpopÚ ExceptionrU )Ú
exceptionsrV rW rX Úexcs r ÚdoModuleCleanupsra „ sq € ð €JÝ
Ü!1×!5Ñ!5Ó!7ш�$˜ð #Ù�dÐ%˜fÒ%ö ñ 𠘉mÐð øô ò #Ø×јc×"Ñ"ûð #ús ¢9 ¹ AÁAÁAc ó^ ‡ — ˆ fd„}t ‰ t j « r‰ }dŠ ||« S |S )z&
Unconditionally skip a test.
c ó‚ •— t | t « st j | « ˆfd„« }|} d| _ ‰| _ | S )Nc ó •— t ‰« ‚r0 ©r )rW rX r; s €r Úskip_wrapperz-skip.