B ŒÞøE!ì «ã@snddlZGdd„deƒZGdd„deƒZGdd„dejƒZGdd „d eƒZGd d „d eƒZGd d „d eƒZdS)éNc@s eZdZdZdd„Zdd„ZdS)Ú TestEqualityzUsed as a mixin for TestCasecCs0x*|jD] \}}| ||¡| ||¡qWdS)N)Úeq_pairsZ assertEqual)ÚselfÚobj_1Úobj_2©rú:/opt/alt/python37/lib64/python3.7/unittest/test/support.pyÚtest_eqs zTestEquality.test_eqcCs0x*|jD] \}}| ||¡| ||¡qWdS)N)Úne_pairsZassertNotEqual)rrrrrrÚtest_nes zTestEquality.test_neN)Ú__name__Ú __module__Ú __qualname__Ú__doc__r r rrrrrsrc@seZdZdZdd„ZdS)Ú TestHashingzUsed as a mixin for TestCasec Csèxp|jD]f\}}y&t|ƒt|ƒks4| d||f¡Wqtk rl}z| d|||f¡Wdd}~XYqXqWxp|jD]f\}}y&t|ƒt|ƒkr¦| d||f¡Wqztk rÞ}z| d|||f¡Wdd}~XYqzXqzWdS)Nz%r and %r do not hash equalzProblem hashing %r and %r: %sz#%s and %s hash equal, but shouldn'tzProblem hashing %s and %s: %s)rÚhashZfailÚ Exceptionr )rrrÚerrrÚ test_hashs*zTestHashing.test_hashN)r r rrrrrrrrsrcs”eZdZ‡fdd„Z‡fdd„Z‡fdd„Z‡fdd„Z‡fd d „Z‡fd d „Z‡fd d„Z ‡fdd„Z ‡fdd„Z ‡fdd„Z ‡fdd„Z ‡ZS)Ú_BaseLoggingResultcs||_tƒ ¡dS)N)Ú_eventsÚsuperÚ__init__)rÚlog)Ú __class__rrr)sz_BaseLoggingResult.__init__cs|j d¡tƒ |¡dS)NÚ startTest)rÚappendrr)rÚtest)rrrr-s z_BaseLoggingResult.startTestcs|j d¡tƒ ¡dS)NÚ startTestRun)rrrr)r)rrrr1s z_BaseLoggingResult.startTestRuncs|j d¡tƒ |¡dS)NÚstopTest)rrrr)rr)rrrr5s z_BaseLoggingResult.stopTestcs|j d¡tƒ ¡dS)NÚ stopTestRun)rrrr )r)rrrr 9s z_BaseLoggingResult.stopTestRuncs|j d¡tƒj|ŽdS)NÚ addFailure)rrrr!)rÚargs)rrrr!=s z_BaseLoggingResult.addFailurecs|j d¡tƒj|ŽdS)NÚ addSuccess)rrrr#)rr")rrrr#As z_BaseLoggingResult.addSuccesscs|j d¡tƒj|ŽdS)NÚaddError)rrrr$)rr")rrrr$Es z_BaseLoggingResult.addErrorcs|j d¡tƒj|ŽdS)NÚaddSkip)rrrr%)rr")rrrr%Is z_BaseLoggingResult.addSkipcs|j d¡tƒj|ŽdS)NÚaddExpectedFailure)rrrr&)rr")rrrr&Ms z%_BaseLoggingResult.addExpectedFailurecs|j d¡tƒj|ŽdS)NÚaddUnexpectedSuccess)rrrr')rr")rrrr'Qs z'_BaseLoggingResult.addUnexpectedSuccess)r r rrrrrr r!r#r$r%r&r'Ú __classcell__rr)rrr(s          rc@seZdZdZedd„ƒZdS)ÚLegacyLoggingResultzo A legacy TestResult implementation, without an addSubTest method, which records its method calls. cCst‚dS)N)ÚAttributeError)rrrrÚ addSubTest\szLegacyLoggingResult.addSubTestN)r r rrÚpropertyr+rrrrr)Vsr)cs eZdZdZ‡fdd„Z‡ZS)Ú LoggingResultzE A TestResult implementation which records its method calls. cs6|dkr|j d¡n |j d¡tƒ |||¡dS)NZaddSubTestSuccessZaddSubTestFailure)rrrr+)rrZsubtestÚerr)rrrr+fs zLoggingResult.addSubTest)r r rrr+r(rr)rrr-asr-c@sHeZdZdZdd„Zdd„Zdd„Zdd „Zd d „Zd d „Z dd„Z dS)Ú#ResultWithNoStartTestRunStopTestRunz?An object honouring TestResult before startTestRun/stopTestRun.cCs.g|_g|_d|_g|_g|_g|_d|_dS)NrF)ZfailuresÚerrorsZtestsRunZskippedZexpectedFailuresZunexpectedSuccessesZ shouldStop)rrrrrqsz,ResultWithNoStartTestRunStopTestRun.__init__cCsdS)Nr)rrrrrrzsz-ResultWithNoStartTestRunStopTestRun.startTestcCsdS)Nr)rrrrrr}sz,ResultWithNoStartTestRunStopTestRun.stopTestcCsdS)Nr)rrrrrr$€sz,ResultWithNoStartTestRunStopTestRun.addErrorcCsdS)Nr)rrrrrr!ƒsz.ResultWithNoStartTestRunStopTestRun.addFailurecCsdS)Nr)rrrrrr#†sz.ResultWithNoStartTestRunStopTestRun.addSuccesscCsdS)NTr)rrrrÚ wasSuccessful‰sz1ResultWithNoStartTestRunStopTestRun.wasSuccessfulN) r r rrrrrr$r!r#r1rrrrr/ns r/) ZunittestÚobjectrrZ TestResultrr)r-r/rrrrÚs .