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/21572/root/usr/lib/python2.4/test/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/21572/root/usr/lib/python2.4/test/test_site.pyc
m๒
‚=5Dc@s๑dZdkZdklZlZlZlZdkZdkZdk	Z	dk
Z
dkZde	ijo
dk
Z
n
edƒ‚deifd„ƒYZdefd„ƒYZd	eifd
„ƒYZd„ZedjoeƒndS(
sTests for 'site'.

Tests assume the initial paths in sys.path once the interpreter has begun
executing have not been removed.

N(sTestSkippeds
TestFailedsrun_unittestsTESTFNtsites!importation of site.py suppressedtHelperFunctionsTestscBsMtZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z	RS(s›Tests for helper functions.

    The setting of the encoding (set using sys.setdefaultencoding) used by
    the Unicode implementation is not tested.

    cCsti|_dS(sSave a copy of sys.pathN(tsystpathtselftsys_path(R((t$/usr/lib/python2.4/test/test_site.pytsetUpscCs|it_dS(sRestore sys.pathN(RRRR(R((RttearDown"scCs–d}tii|Œ}ti|Œ\}}|i
tii|ƒ|ƒ|tii|ƒjo|i
||ƒn|i
tii|ƒ|ƒdS(Nt	BeginningtEnd(R	R
(
t
path_partstosRtjointoriginal_dirRtmakepathtabs_dirtnorm_dirRtfailUnlessEqualtabspathtnormcase(RRRRR((Rt
test_makepath&scCsŠtiƒ}xwg}tiD]8}|o+tii|ƒo|ti|ƒdqq~D]&}|i||jd||fƒq\WdS(NisB%s from sys.path not found in set returned by _init_pathinfo(): %s(Rt_init_pathinfotdir_sett_[1]RRRtisdirRtentryRt
failUnless(RRRRR((Rttest_init_pathinfo3s
PcCsj|i|itijd|iƒ|iti|iƒdti	jƒ|it
i	i|iƒƒdS(s>Contain common code for testing results of reading a .pth files%s not in sys.pathiN(
RRtpth_filetimportedRtmodulesRRt
good_dir_pathRRtexiststbad_dir_path(RR((Rtpth_file_tests;s
&cCsbtƒ}|idtƒz7|iƒti|i|it	ƒƒ|i|ƒWd|iƒXdS(Ntprep(tPthFileRtcleanuptTruetcreateRt
addpackagetbase_dirtfilenametsetRR#(RR((Rttest_addpackageBs	
cCs\tƒ}|idtƒz1|iƒti|itƒƒ|i
|ƒWd|iƒXdS(NR$(R%RR&R'R(Rt
addsitedirR*R,RR#(RR((Rttest_addsitedirQs	
(
t__name__t
__module__t__doc__RRRRR#R-R/(((RRs			
			R%cBs8tZdZedddd„Zd„Zed„ZRS(s/Helper class for handling testing of .pth filesttimet__testdir__t__badcCs›|d|_tiidƒ|_tii|i|iƒ|_||_	||_
||_tii|i|i
ƒ|_tii|i|iƒ|_
dS(sInitialize instance variabless.pthtN(t
filename_baseRR+RRRR*R
t	file_pathRtgood_dirnametbad_dirnameR R"(RR7RR9R:((Rt__init__as
			c	Cswt|idƒ}zC|dIJ|dIJ|d|iIJ||iIJ||iIJWd|iƒXti	|i
ƒdS(soCreate a .pth file with a comment, blank lines, an ``import
        <self.imported>``, a line with self.good_dirname, and a line with
        self.bad_dirname.

        Creation of the directory for self.good_dir_path (based off of
        self.good_dirname) is also performed.

        Make sure to call self.cleanup() to undo anything done by this method.

        twUs#import @bad module names
s	import %sN(topenRR8tFILERR9R:tcloseRtmkdirR (RR>((RR(ms



cCsแtii|iƒoti|iƒn|o7tii	|i
ƒ|_|ioti|i
=q‰n"|io|iti|i
<ntii|iƒoti
|iƒntii|iƒoti
|iƒndS(sฐMake sure that the .pth file is deleted, self.imported is not in
        sys.modules, and that both self.good_dirname and self.bad_dirname are
        not existing directories.N(RRR!RR8tremoveR$RRtgetRtimported_moduleR trmdirR"(RR$((RR&ƒs

(R0R1R2tTESTFNR;R(tFalseR&(((RR%^s	tImportSideEffectTestscBsqtZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d„Z
d	„Zd
„Zd„Z
RS(s(Test side-effects from importing 'site'.cCsti|_dS(sMake a copy of sys.pathN(RRRR(R((RR˜scCs|it_dS(sRestore sys.pathN(RRRR(R((RRœscCsetiƒxTtttfD]C}y$|itii	|i
ƒ|
ƒWqtj
o
qqXqWdS(N(Rtabs__file__RRt__builtin__tmoduleRRRtisabst__file__tAttributeError(RRJ((Rttest_abs__file__ s
$cCsKtiƒtƒ}x1tiD]&}|i||jƒ|i|ƒqWdS(N(	RtremoveduppathsR,t
seen_pathsRRRRtadd(RRPR((Rttest_no_duplicate_pathsฎs
	
cCsdS(N((R((Rttest_add_build_dirทscCs0|ittdƒƒ|ittdƒƒdS(Ntquittexit(RRthasattrRI(R((Rttest_setting_quitฝscCs0|ittdƒƒ|ittdƒƒdS(Nt	copyrighttcredits(RRRVRI(R((Rttest_setting_copyrightยscCs|ittdƒƒdS(Nthelp(RRRVRI(R((Rttest_setting_helpวscCs{tidjogdk}|iƒdidƒo@x=tiiiƒD]}|djoPqFqFW|i
dƒqwndS(Ntwin32itcptmbcssdid not alias mbcs(Rtplatformtlocaletgetdefaultlocalet
startswitht	encodingstaliasest
itervaluestvalueRtfail(RRaRg((Rttest_aliasing_mbcsหs	
	cCs|ittdƒƒdS(Ntsetdefaultencoding(RRRVR(R((Rttest_setdefaultencoding_removedีscCsKtiidƒp4y
dk}Wntj
oqGX|idƒndS(Nt
sitecustomizes(sitecustomize not imported automatically(RRthas_keyRltImportErrorRRh(RRl((Rttest_sitecustomize_executedูs
(R0R1R2RRRNRRRSRWRZR\RiRkRo(((RRG•s										
	cCstttƒdS(N(trun_unittestRRG(((Rt	test_mainๆst__main__(R2tunittestttest.test_supporttTestSkippedt
TestFailedRpRERIRRRdttempfileRRtTestCaseRtobjectR%RGRqR0(RuR%RwRGRsRRIRRRdRpRvRRERq((Rt?s 						
H7Q	


Anon7 - 2021