��Qc@s�dZddlZddlZddlZddlZddlZddlZddlm Z m
Z
ddlZddlm
Z
dZdZde
jejfd��YZd �Zed
kr�e
e��ndS(sTests for distutils.core.i�N(tcaptured_stdouttrun_unittest(tsupports4
__file__
from distutils.core import setup
setup()
sG
import os
print os.getcwd()
from distutils.core import setup
setup()
tCoreTestCasecBsPeZd�Zd�Zd�Zejjd�Zd�Z d�Z
d�ZRS(cCsCtt|�j�tj|_|j�tjtjf|_dS(N( tsuperRtsetUptsyststdoutt
old_stdouttcleanup_testfntargvtold_argv(tself((s//sys/lib/python2.7/distutils/tests/test_core.pyR"s
cCsN|jt_|j�|jdt_|jdtj(tt|�j�dS(Nii( RRRR RR
RRttearDown(R((s//sys/lib/python2.7/distutils/tests/test_core.pyR
(s
cCsTtjj}tjj|�r.tj|�n"tjj|�rPtj |�ndS(N(
ttestttest_supporttTESTFNtostpathtisfiletremovetisdirtshutiltrmtree(RR((s//sys/lib/python2.7/distutils/tests/test_core.pyR /s
cCs2t|d�}z|j|�Wd|j�X|S(Ntw(topentwritetclose(RttextRtf((s//sys/lib/python2.7/distutils/tests/test_core.pytwrite_setup6s
cCstjj|jt��dS(N(t distutilstcoret run_setupRtsetup_using___file__(R((s//sys/lib/python2.7/distutils/tests/test_core.pyttest_run_setup_provides_file>s cCs�tj�t_tj�}tjtjj�tj j
tjjd�}tjj
|jtd|��tjj�}|jd�r�|d }n|j||�dS(Nssetup.pyRs
i�(tStringIORRRtgetcwdtmkdirRRRRtjoinRR R!Rtsetup_prints_cwdtgetvaluetendswithtassertEqual(Rtcwdtsetup_pytoutput((s//sys/lib/python2.7/distutils/tests/test_core.pyttest_run_setup_uses_current_dirDs
cCs�ddgt_t��}tjjdd�WdQX|jd�|j|j�d�t tj_
z)t��}tjjdd�WdQXWdttj_
X|jd�d}|j|j�d|�dS(Nssetup.pys--nametnametbarisbar
s&options (after parsing config files):
(
RR
RRR tsetuptseekR+treadtTruetDEBUGtFalset readlines(RRtwanted((s//sys/lib/python2.7/distutils/tests/test_core.pyttest_debug_modeVs
(t__name__t
__module__RR
R RRRRR#R/R:(((s//sys/lib/python2.7/distutils/tests/test_core.pyR s cCs
tjt�S(N(tunittestt makeSuiteR(((s//sys/lib/python2.7/distutils/tests/test_core.pyt
test_suitehst__main__(t__doc__R$tdistutils.coreRRRRttest.test_supportRRRR=tdistutils.testsRR"R(tEnvironGuardtTestCaseRR?R;(((s//sys/lib/python2.7/distutils/tests/test_core.pyt<module>s H
|