ronnie
2022-10-14 1504bb53e29d3d46222c0b3ea994fc494b48e153
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
P\¬Qc@s¡ddlZddlZddlZddlZddlZddlmZdejfd„ƒYZdejfd„ƒYZ    d„Z
e dkre
ƒndS(    iÿÿÿÿN(t test_supporttFileCompareTestCasecBs,eZd„Zd„Zd„Zd„ZRS(cCs·tj|_tjd|_tjd|_d}xF|j|j|jgD],}t|dƒ}|j|ƒ|jƒqKWt|jdƒ}|jdƒ|jƒtj    ƒ|_
dS(Ns-sames-diffsContents of file go here.
twsa+sAn extra line.
( RtTESTFNtnamet    name_samet    name_difftopentwritetclosettempfilet
gettempdirtdir(tselftdataRtoutput((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_filecmp.pytsetUps   
cCs4tj|jƒtj|jƒtj|jƒdS(N(tostunlinkRRR(R ((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_filecmp.pyttearDownscCs˜|jtj|j|jƒdƒ|jtj|j|jdtƒdƒ|jtj|j|jdtƒdƒ|jtj|j|jƒdƒdS(NsComparing file to itself failstshallows&Comparing file to identical file fails(t
assertTruetfilecmptcmpRRtFalse(R ((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_filecmp.pyt test_matchings!!cCsH|jtj|j|jƒdƒ|jtj|j|jƒdƒdS(Ns!Mismatched files compare as equals#File and directory compare as equal(t assertFalseRRRRR (R ((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_filecmp.pyttest_different%s(t__name__t
__module__RRRR(((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_filecmp.pyRs            
tDirCompareTestCasecBs,eZd„Zd„Zd„Zd„ZRS(cCsYtjƒ}tjj|dƒ|_tjj|dƒ|_tjj|dƒ|_tjjdƒtjjdƒk|_    d}x™|j|j|jgD]}t
j |t ƒtj |ƒ|j    rÞ||jkrÞd}nd}ttjj||ƒd    ƒ}|j|ƒ|jƒqšWttjj|jd
ƒd    ƒ}|jd ƒ|jƒdS( NR sdir-samesdir-difftAtasContents of file go here.
tFiLetfileRtfile2sAn extra file.
(R
R RtpathtjoinR tdir_sametdir_difftnormcasetcaseinsensitivetshutiltrmtreetTruetmkdirRRR    (R ttmpdirRR tfnR((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_filecmp.pyR,s$ '      ! cCs4tj|jƒtj|jƒtj|jƒdS(N(R*R+R R&R'(R ((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_filecmp.pyRBscCs^|jtj|j|jdgƒdgggfkdƒ|jtj|j|jdgƒdgggfkdƒ|jtj|j|jdgdtƒdgggfkdƒ|jtj|j|jdgdtƒdƒttjj    |jdƒdƒ}|j
dƒ|j ƒ|j tj|j|jddgƒdgdggfkdƒdS(    NR"s#Comparing directory to itself failss!Comparing directory to same failsRR#RsDifferent contents.
s&Comparing mismatched directories fails( RRtcmpfilesR R&RRRR$R%RR    R(R R((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_filecmp.pyt test_cmpfilesGs(!!!!! 
 cCs/tj|j|jƒ}|jrL|j|j|jgdgdggƒn(|j|j|jgdgdggƒ|j|j    dgkƒ|j|j
|j ko°gknƒ|j|j dgkƒ|j|j gkƒtj|j|jƒ}|j|jdgkƒ|j|jddgkƒ|j|j    dgkƒ|j|j
gkƒ|j|j dgkƒ|j|j dgkƒ|j|j gkƒttjj|jdƒdƒ}|jdƒ|jƒtj|j|jƒ}|j|j dgkƒ|j|j dgkƒdS(NR"R!R#RsDifferent contents.
(RtdircmpR R&R)t assertEqualt    left_listt
right_listRtcommont    left_onlyt
right_onlyt
same_filest
diff_filesR'RRR$R%RR    (R tdR((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_filecmp.pyt test_dircmpcs,    +()! 
(RRRRR1R<(((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_filecmp.pyR+s            cCstjttƒdS(N(Rt run_unittestRR(((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_filecmp.pyt    test_main‚st__main__( RRR*R
tunittestttestRtTestCaseRRR>R(((sY/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/test/test_filecmp.pyt<module>s0 %W