Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 13.59.104.84
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : test_compileall.pyo
�
?��cc@s�ddlZddlZddlZddlZddlZddlZddlZddlmZddl	Z	de	j
fd��YZd�Ze
dkr�e�ndS(i����N(ttest_supporttCompileallTestscBsbeZd�Zd�Zd�Zejeed�d�d��Z	d�Z
d�Zd�ZRS(	cCs�tj�|_tjj|jd�|_|jtr<dnd|_t	|jd��}|j
d�WdQXtjj|jd�|_|jtr�dnd|_t
j|j|j�dS(Ns_test.pytctotwsx = 123
s	_test2.py(ttempfiletmkdtempt	directorytostpathtjointsource_patht	__debug__tbc_pathtopentwritetsource_path2tbc_path2tshutiltcopyfile(tselftfile((s;/usr/local/python-2.7/lib/python2.7/test/test_compileall.pytsetUpscCstj|j�dS(N(RtrmtreeR(R((s;/usr/local/python-2.7/lib/python2.7/test/test_compileall.pyttearDownscCsjt|jd��}|jd�}WdQXttj|j�j�}tj	dt
j�|�}||fS(Ntrbis<4sl(RR
treadtintRtstatRtst_mtimetstructtpacktimpt	get_magic(RRtdatatmtimetcompare((s;/usr/local/python-2.7/lib/python2.7/test/test_compileall.pyR"s
Rstest needs os.stat()cCs�tj|j�|j|j��t|jd��}|j�t|�}WdQXt|jd��!}|j	|�|j	|�WdQX|j
|j��tj|j
dtdt�|j|j��dS(sOCheck that compileall recreates bytecode when the new metadata is
        used.RNtwbtforcetquiet(t
py_compiletcompileRtassertEqualR"RR
RtlenRtassertNotEqualt
compilealltcompile_dirRtFalsetTruet
assertTrue(RtmetadataRtbc((s;/usr/local/python-2.7/lib/python2.7/test/test_compileall.pytrecreation_check"s
cCs&|jtjdtj�d��dS(Ns<4sli(R4RRR R!(R((s;/usr/local/python-2.7/lib/python2.7/test/test_compileall.pyt
test_mtime1scCs|jd�dS(Ns(R4(R((s;/usr/local/python-2.7/lib/python2.7/test/test_compileall.pyttest_magic_number5scCsx5|j|jfD]!}ytj|�WqqXqWtj|jdtdt�|j	tj
j|j�o�tj
j|j��tj|j�tj|j
dtdt�|j	tj
j|j�o�tj
j|j��tj|j�tj|j�dS(NR&R'(R
RRtunlinkR-tcompile_fileRR/R0R1R	tisfileR.R(Rtfn((s;/usr/local/python-2.7/lib/python2.7/test/test_compileall.pyttest_compile_files9s(
t__name__t
__module__RRR"tunittestt
skipUnlessthasattrRR4R5R6R;(((s;/usr/local/python-2.7/lib/python2.7/test/test_compileall.pyRs	
		$		cCstjt�dS(N(Rtrun_unittestR(((s;/usr/local/python-2.7/lib/python2.7/test/test_compileall.pyt	test_mainJst__main__(R-R RR(RRRttestRR>tTestCaseRRBR<(((s;/usr/local/python-2.7/lib/python2.7/test/test_compileall.pyt<module>s>	
© 2025 GrazzMean