KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8e-fips-rhel5 DAV/2 PHP/5.2.17
System : Linux localhost 2.6.18-419.el5 #1 SMP Fri Feb 24 22:47:42 UTC 2017 x86_64
User : nobody ( 99)
PHP Version : 5.2.17
Disable Function : NONE
Directory :  /proc/21573/root/usr/lib/python2.4/site-packages/dogtail/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21573/root/usr/lib/python2.4/site-packages/dogtail/tc.pyc
mò
	0Ec	@s(dZdZdkZdkZdkZdkZdkZdkZdkZdk	l	Z	dk
lZlZl
Z
dklZdfd„ƒYZdefd	„ƒYZd
efd„ƒYZdefd
„ƒYZedjoDdkZdkTdZdZdZdZhZeƒZeieeeeƒZeGHdZdZhZdZeieeeeƒZeGHeƒZdZdZdZdZhZeieeeeƒZeGHdZdZdZdZhZeieeeeƒZeGHdZdZdZdZhZeieeeeƒZeGHdZdZdZdZhZeGHdZdZdZdZhZeieeeeƒZeGHd ZdZd!Zd!ZhZeieeeeƒZeGHd"ZdZd!Zd#ZhZeieeeeƒZeGHeƒZei d$ƒZ!e!GHei"ƒZ#e#GHd%Zd&Zd'ZhZeƒZ$e$ieeeƒZeGHd(Zd&Zd)ZhZe$ieeeƒZeGHd*Zd&Zd'ZhZdOZ%xGe&e'e%ƒƒD]3Z(e$ieeed0e%e(ƒZe%e(GHeGHqÃWd1Zd)Zd2ZhZdPZ%xGe&e'e%ƒƒD]3Z(e$ieeed0e%e(ƒZe%e(GHeGHq+Wd3Zd)Zd2ZhZdQZ%d4Z)xMe&e'e%ƒƒD]9Z(e$ieeed0e%e(d5e)ƒZe%e(GHeGHq™Wd6Zd)Zd2ZhZd7Z%e$ieeed0e%ƒZeGHd8Zd9Zd9Zd:Z*hZeƒZ+e+ieeee*ƒZeGHd;Zd<ZhZe+ieeee*ƒZeGHd=Zd>Zd>Zd?Z*hZe+ieeee*ƒZeGHd@ZdAZdAZdBZ*hZe+ieeee*ƒZeGHdCZdDdEZdDdEZdFZ*hZe+ieeee*ƒZeGHdGZdHZdHZdIZ*hZe+ieeee*ƒZeGHdJZdHZdHZdKZ*hZe+ieeee*ƒZeGHdLZdHZdHZd:Z*hZe+ieeee*ƒZeGHdMZdNZ*hZe+ieeee*ƒZeGHndS(Rs:Test Case magic

Author: Ed Rousseau <rousseau@redhat.com>s!Ed Rousseau <rousseau@redhat.com>N(sconfig(s
ResultsLoggers	TimeStampsdebugLogger(sDependencyNotFoundErrortTCcBs/tZdZeƒZd„Zeid„ZRS(s"
    The Test Case Superclass
    cCsti|_d
|_dS(Ntasciisutf-8sutf-16s	utf-16-bes	utf-16-lesunicode-escapesraw-unicode-escapetbig5tgb18030teucJPteucKRtshiftJIS(sasciisutf-8sutf-16s	utf-16-bes	utf-16-lesunicode-escapesraw-unicode-escapesbig5sgb18030RRR(tconfigtencodingtselftsupportedtypes(R	((t./usr/lib/python2.4/site-packages/dogtail/tc.pyt__init__scCsm|iƒ|_||_||_xC|i|igD]/}yt|dƒ}Wq4tj
oq4Xq4W||_|i|i	jo¬|ii
|iƒ|_|ii
|iƒ|_|i|ijoh|id<|_n3h|id|id|id|i<|_ti
i|iƒ|iSn;h|id|id<|_ti
i|iƒ|iSdS(	s
        Compares 2 strings to see if they are the same. The user may specify
        the encoding to which the two strings are to be normalized for the
        comparison. Default encoding is the default system encoding.
        Normalization to extended 8 bit charactersets is not supported.

        When the origin of either baseline or undertest is a text file whose
        encoding is something other than ASCII, it is necessary to use
        codecs.open() instead of open(), so the file's encoding may be
        specified.
        sutf-8tPasseds	Failed - s strings do not match. s expected: Got sERROR - s! is not a supported encoding typeN(tlabeltstripR	tbaselinet	undertesttstringtunicodet	TypeErrorRR
tencodetresultRtloggertlog(R	RRRRR((Rtcompares,				2 (	t__name__t
__module__t__doc__t
ResultsLoggerRRRRR(((RRs		tTCStringcBstZdZd„ZRS(s 
    String Test Case Class
    cCsti|ƒdS(N(RRR	(R	((RRLs(RRRR(((RRHstTCImagecBs/tZdZdZd„Zdddd„ZRS(s 
    Image Test Case Class.
    tcCs‰ti|ƒd|_ti|_d|_tidƒi	ƒ}tid	|ƒ}|dj	o|iƒd}|t_n
td
‚dS(NtMAEtMSEtPSEtPSNRtRMSEtnoneiscompare -versions"Version: ImageMagick ([0-9\.]+) .*tImageMagick(R!R"R#R$R%R&(RRR	tsupportedmetricsRt
scratchDirtdeldfiletostpopentreadlinetIMVertretmatchtNonetgroupsRt	IMVersiontDependencyNotFoundError(R	R.((RRVs
		

tdefaultR&f0.0cCs|iƒ|_|iƒ|_|iƒ|_d|_|iƒ|_||_|djoMt	ƒ}|idƒ}di
|ƒ}|i|i|ƒ|_d|_n||_d|_|i|ijoø|idjo­d|id|id|idd	}
ti|
ƒiƒ}
|
gjoh|id
<|_n*|
diƒ}h|id|<|_tii|iƒ|iSnæd|id|id|id|idd	}
ti|
ƒiƒ}
t}ti}|d
jot |
ƒdjo
t!}n|djot |
ƒdjo
t!}n|o'|
d}h|id|<|_nð|
diƒ}|idƒ}|d}t"|ƒ}|t"dƒjo+h|iddt#|ƒd<|_n}||ijo8||i}h|iddt#|ƒd<|_n5|i|}	h|iddt#|	ƒd<|_tii|iƒ|iS|idjoByti&|iƒWqÁt'j
ot(id|iƒqÁXqÿn;h|id|id<|_tii|iƒ|iSdS(s¼
        Calls ImageMagick's "compare" program. Default compares are based on
size but metric based comparisons are also supported with a threshold
determining pass/fail criteria.
        f0.0R5t R iiR&scompare s2>&1s!Passed - Images are the same sizes	Failed - scompare -metric s6.2.3s6.2.4tinfs	Passed - scompare results: s dBs%compare result exceeds threshold by: s$compare results under threshold by: sCould not delete tempfile s( is not in the list of supported metricsN()RRR	RRt
differencetmetrict	thresholdtdfilet	TimeStamptxtsplittsplabeltjoinR)t	fileStampR*R(tcmdR+R,t	readlinestanswerRtfanswerRRRtTruetmetricFailedRR3tlentFalsetfloattstrtexcesstundertremovetIOErrortdebugLogger(R	RRRR;R9R:R?RGRMRDR3RLRBR=RE((RRfsr		
	
		+
6	 
 


+
+
'! (RRRR3RR(((RRPs	tTCNumbercBs tZdZd„Zd„ZRS(s,
    Number Comparaison Test Case Class
    cCsti|ƒd|_dS(NtinttlongRJtcomplextoctthex(sintslongsfloatscomplexsoctshex(RRR	R
(R	((RRÅs
cCsÊ|iƒ|_||_||_|iƒ|_|i|ijoI|idjo(t|iƒ|_t|iƒ|_n•|idjo(t|iƒ|_t|iƒ|_n]|idjo(t	|iƒ|_t	|iƒ|_n%t
|iƒ|_t
|iƒ|_|i|ijoh|id<|_n4h|idt|iƒdt|iƒ<|_t
ii|iƒ|iSn;h|id|id<|_t
ii|iƒ|iSdS(	s
        Compares 2 numbers to see if they are the same. The user may specify
        how to normalize mixed type comparisons via the type argument.
        RRRSRJsPassed - numbers are the sames	Failed - s expected: Got s" is not in list of supported typesN(RRR	RRttypeR
RRRSRJRTRRKRRR(R	RRRRW((RRÊs2		3 (RRRRR(((RRQÁs	t__main__(t*ttestsunit test case 1.0sutf-8ttestysunit test case 1.1s unit test case 2.0ugroßugroás unit test case 2.1splease works unit test case 2.2tswahillis unit test case 2.3tnomatchs unit test case 2.4sThis is inhereiteds unit test case 2.5uã‚ã‹s unit test case 2.6u元気t	filestampsunit test case 3.0s../examples/data/20w.pngs../examples/data/20b.pngsunit test case 3.1s../examples/data/10w.pngsunit test case 3.2R!R"R#R$s RMSER9sunit test case 3.3s../examples/data/10b.pngsunit test case 3.4iR:sunit test case 3.5tGuesssunit test case 4.0i*RRsunit test case 4.1içsunit test case 4.2ly8P‰U®2<'sRSsunit test case 4.3f99.432670000000002RJsunit test case 4.4iCx0.03.0RTsunit test case 4.5iRUsunit test case 4.6RVsunit test case 4.7sunit test case 4.8tface(sMAEsMSEsPSEsPSNRs RMSE(sMAEsMSEsPSEsPSNRs RMSE(sMAEsMSEsPSEsPSNRs RMSE(,Rt
__author__RtsysR+R/ttimetdatetimetos.pathRtloggingRR<RPterrorsR4RRRRQRtcodecstutilsRRRRRtcase1Rtcase2tstamp1RAt	presentlyt
entryStamptentrytcase3tmetricstrangeRHtitboundRWtcase4(!RPRR4RtRdRRRjRpRkRuRmRR/RRQRRRRRR<RaRbRhRRqRsRWRlRcRoR+((Rt?sŠ							

5q0
									%			



Anon7 - 2021