ó {G_Tc@sĤdZddlZddlmZmZeddeƒZddlZddlZddl Z ddl Z dej fd„ƒYZ d„Z ed kr˘e ƒndS( s7 Test cases for the dircache module Nick Mathewson i˙˙˙˙N(t run_unittestt import_moduletdircachet deprecatedt DircacheTestscBsGeZd„Zd„Zd„Zd„Zd„Zd„Zd„ZRS(cCstjƒ|_dS(N(ttempfiletmkdtempttempdir(tself((s./usr/local/lib/python2.7/test/test_dircache.pytsetUp scCs>x'tj|jƒD]}|j|ƒqWtj|jƒdS(N(tostlistdirRtdelTemptrmdir(Rtfname((s./usr/local/lib/python2.7/test/test_dircache.pyttearDownscCs/ttjj|j|ƒdƒ}|jƒdS(Ntw(topenR tpathtjoinRtclose(RRtf((s./usr/local/lib/python2.7/test/test_dircache.pyt writeTemps!cCs#tjtjj|j|ƒƒdS(N(R tmkdirRRR(RR((s./usr/local/lib/python2.7/test/test_dircache.pyt mkdirTempscCsKtjj|j|ƒ}tjj|ƒr:tj|ƒn tj|ƒdS(N(R RRRtisdirR tunlink(RR((s./usr/local/lib/python2.7/test/test_dircache.pyR scCsÖtj|jƒ}|j|gƒ|jtj|jƒ|kƒtjd dkrµtjdƒ|j dƒtj|jƒ}|j|dgƒ|jtj|jƒ|kƒn|j t tj|jdƒdS(Nitwintos2ittest1t _nonexistent(Rsos2( RR Rt assertEqualt assertTruetsystplatformttimetsleepRt assertRaisestOSError(Rtentries((s./usr/local/lib/python2.7/test/test_dircache.pyt test_listdir#s  "cCsY|jdƒ|jdƒdddg}tj|j|ƒ|j|dddgƒdS(Nttest2tAttest_nonexistentsA/(RRRtannotateRR(Rtlst((s./usr/local/lib/python2.7/test/test_dircache.pyt test_annotate=s   ( t__name__t __module__R RRRR R(R.(((s./usr/local/lib/python2.7/test/test_dircache.pyR s      cCs zttƒWdtjƒXdS(N(RRRtreset(((s./usr/local/lib/python2.7/test/test_dircache.pyt test_mainEst__main__(t__doc__tunittestttest.test_supportRRtTrueRR R#R!RtTestCaseRR2R/(((s./usr/local/lib/python2.7/test/test_dircache.pyts 09