403Webshell
Server IP : 118.27.122.248  /  Your IP : 216.73.216.15
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/distutils/tests/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /opt/alt/python36/lib64/python3.6/distutils/tests/__pycache__/test_filelist.cpython-36.pyc
3

x2_�,�@s�dZddlZddlZddlZddlmZddlmZddlm	Z	ddl
mZmZm
Z
ddlmZddlZddlmZmZdd	lmZd
Zdd�ZGd
d�dejej�ZGdd�dej�Zdd�Zedkr�ee��dS)zTests for distutils.filelist.�N)�debug)�WARN)�DistutilsTemplateError)�
glob_to_re�translate_pattern�FileList)�filelist)�captured_stdout�run_unittest)�supportz�include ok
include xo
exclude xo
include foo.tmp
include buildout.cfg
global-include *.x
global-include *.txt
global-exclude *.tmp
recursive-include f *.oo
recursive-exclude global *.x
graft dir
prune dir3
cCs|jdtj�S)z"Converts '/' in a string to os.sep�/)�replace�os�sep)�s�r�B/opt/alt/python36/lib64/python3.6/distutils/tests/test_filelist.py�make_local_pathsrc@sdeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�FileListTestCasecCs|j|jt�g�|j�dS)N)�assertEqual�get_logsr�
clear_logs)�selfrrr�assertNoWarnings'sz!FileListTestCase.assertNoWarningscCs"|jt|jt��d�|j�dS)Nr)Z
assertGreater�lenrrr)rrrr�assertWarnings+szFileListTestCase.assertWarningscCsNtj}tjdkrtjtj�}x,dD]$\}}|d|i}|jt|�|�q"WdS)N�\�foo*�(?s:foo[^%(sep)s]*)\Z�foo?�(?s:foo[^%(sep)s])\Z�foo??�(?s:foo[^%(sep)s][^%(sep)s])\Z�foo\\*�(?s:foo\\\\[^%(sep)s]*)\Z�foo\\\*�(?s:foo\\\\\\[^%(sep)s]*)\Z�foo????�2(?s:foo[^%(sep)s][^%(sep)s][^%(sep)s][^%(sep)s])\Z�foo\\??�"(?s:foo\\\\[^%(sep)s][^%(sep)s])\Zr�rr�rr �r!r"�r#r$�r%r&�r'r(�r)r*)r+r,r-r.r/r0r1)rr�re�escaperr)rrZglob�regexrrr�test_glob_to_re/s
z FileListTestCase.test_glob_to_recCs�t�}t}ddddd|d�|d�|d�|d	�|d
�|d�|d�|d
�|d�|d�g|_x*tjd�D]}|j�dkrtqb|j|�qbWddd|d�|d�|d�|d�|d�|d
�g	}|j|j|�dS)Nzfoo.tmp�okZxozfour.txtzbuildout.cfgz.hg/last-message.txtzglobal/one.txtzglobal/two.txtzglobal/files.xzglobal/here.tmpzf/o/f.ooz
dir/graft-onezdir/dir2/graft2zdir3/okzdir3/sub/ok.txt�
�)	rr�allfiles�MANIFEST_IN�split�strip�process_template_liner�files)r�	file_list�l�lineZwantedrrr�test_process_template_lineAs8
z+FileListTestCase.test_process_template_linecCsvt�}t��}|jd�WdQRX|j|j�d�dt_z0t��}|jd�WdQRX|j|j�d�Wddt_XdS)NZxxxr8Tzxxx
F)rr	Zdebug_printr�getvaluer�DEBUG)rr?�stdoutrrr�test_debug_printisz!FileListTestCase.test_debug_printcCs,t�}dddg}|j|�|j|j|�dS)N�a�b�c)r�set_allfilesrr9)rr?r>rrr�test_set_allfilesws

z"FileListTestCase.test_set_allfilescCsBt�}ddddddg|_|j�|j�|j|jddddg�dS)NrGrH�grI)rr>�sortZremove_duplicatesr)rr?rrr�test_remove_duplicates}s
z'FileListTestCase.test_remove_duplicatescCsr|jttdddd�d��tjd�}|jt|ddd�|�|jttdddd�d��|jtdddd�jd��dS)NrGTF)ZanchorZis_regex�searchz*.pyzfilelist.py)�
assertTrue�hasattrrr2�compilerrO)rr4rrr�test_translate_pattern�s
z'FileListTestCase.test_translate_patterncCsdt�}|j|jd��t�}ddg|_|j|jd��t�}ddg|_|jd�|j|jdg�dS)Nz*.pyza.pyzb.pyza.txt)r�assertFalseZexclude_patternr>rPr)rr?rrr�test_exclude_pattern�s


z%FileListTestCase.test_exclude_patterncCs�t�}|jg�|j|jd��t�}|jddg�|j|jd��t�}|j|j�|jddg�|jd�|j|jddg�dS)Nz*.pyza.pyzb.txt�*)rrJrTZinclude_patternrPZassertIsNoner9r)rr?rrr�test_include_pattern�s

z%FileListTestCase.test_include_patternc	Cs�t}t�}xd!D]}|jt|j|�qWt�}|jd
d|d�g�|jd
�|j|jd
g�|j�|jd�|j|jd
g�|j	�t�}d
d|d�g|_|jd�|j|jd|d�g�|j�|jd�|j|jd|d�g�|j	�t�}|jd
d|d�g�|jd�|j|jd
|d�g�|j�|jd�|j|jd
|d�g�|j	�t�}d
d|d�g|_|jd�|j|jdg�|j�|jd�|j|jdg�|j	�t�}|jd
|d�|d�|d�g�|jd�|j|j|d�|d�g�|j�|jd�|j|j|d�|d�g�|j	�t�}d
|d�|d�|d�g|_|jd�|j|jd
|d�g�|j�|jd�|j|jd
|d�g�|j	�t�}|jd
|d�|d�|d�g�|jd�|j|j|d�|d�g�|j�|jd�|j|j|d�|d�g�|j	�t�}d
|d�|d�|d�g|_|jd�|j|jd
|d�g�|j�|jd �|j|jd
|d�g�|j	�dS)"N�include�exclude�global-include�global-exclude�recursive-include�recursive-exclude�graft�prune�blargza.pyzb.txtzd/c.pyzinclude *.pyzinclude *.rbzexclude *.pyzexclude *.rbzglobal-include *.pyzglobal-include *.rbzglobal-exclude *.pyzglobal-exclude *.rbzd/b.pyzd/c.txtzd/d/e.pyzrecursive-include d *.pyzrecursive-include e *.pyzrecursive-exclude d *.pyzrecursive-exclude e *.pyzf/f.pyzgraft dzgraft ezprune dzprune e)	rXrYrZr[r\r]r^r_r`)
rrZassertRaisesrr=rJrr>rr)rr@r?�actionrrr�test_process_template�s�















z&FileListTestCase.test_process_templateN)�__name__�
__module__�__qualname__rrr5rBrFrKrNrSrUrWrbrrrrr$s(rc@s,eZdZejjdd��Zdd�Zdd�ZdS)�FindAllTestCasec
Cs6tjj��"tjdd�|jtj�g�WdQRXdS)N�foo�bar)�testr�temp_cwdr�symlinkrr�findall)rrrr�test_missing_symlink*sz$FindAllTestCase.test_missing_symlinkc
Cs~tjj��jtjd�tjjdd�}tjj|�tjd�tjjdd�}tjj|�||g}|jt	t
j��|�WdQRXdS)z�
        When findall is called with no parameters or with
        '.' as the parameter, the dot should be omitted from
        the results.
        rgz	file1.txtrhz	file2.txtN)rirrjr�mkdir�path�join�create_empty_filer�sortedrrl)r�file1Zfile2�expectedrrr�test_basic_discovery0s

z$FindAllTestCase.test_basic_discoveryc
CsLtjj��8}tjj|d�}tjj|�|g}|jtj	|�|�WdQRXdS)zj
        When findall is called with another path, the full
        path name should be returned.
        z	file1.txtN)
rir�temp_dirrrorprqrrrl)rrvrsrtrrr�test_non_local_discovery@s
z(FindAllTestCase.test_non_local_discoveryN)	rcrdrerirZskip_unless_symlinkrmrurwrrrrrf)srfcCstjtjt�tjt�g�S)N)�unittestZ	TestSuiteZ	makeSuiterrfrrrr�
test_suiteLsry�__main__)�__doc__rr2rxZ	distutilsrZ
distutils.logrZdistutils.errorsrZdistutils.filelistrrrrZtest.supportrir	r
Zdistutils.testsrr:rZLoggingSilencerZTestCaserrfryrcrrrr�<module>s*#

Youez - 2016 - github.com/yon3zu
LinuXploit