HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //proc/thread-self/root/usr/local/lib/python3.7/test/__pycache__/test_fnmatch.cpython-37.pyc
B

��gC�@s~dZddlZddlZddlZddlmZmZmZmZGdd�dej�Z	Gdd�dej�Z
Gdd	�d	ej�Zed
krze�
�dS)z"Test cases for the fnmatch module.�N)�fnmatch�fnmatchcase�	translate�filterc@sReZdZdefdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�ZdS)�FnmatchTestCaseTcCs>|r |�|||�d||f�n|�|||�d||f�dS)Nzexpected %r to match pattern %rz#expected %r not to match pattern %r)Z
assertTrueZassertFalse)�self�filename�patternZshould_match�fn�r�-/usr/local/lib/python3.7/test/test_fnmatch.py�check_matchszFnmatchTestCase.check_matchcCs�|j}|dd�|dd�|dd�|dd�|dd�|dd�|dd�|dd�|dd	d
�|ddd
�|dd
d
�|dd�|dd�|ddd
�|dd�|dd�|ddd
�|dd�dS)N�abcz?*?z???*z*???z???�*zab[cd]zab[!de]zab[de]F�az??�b�\z[\]z[!\]zfoo
barzfoo*zfoo
bar
z
foo�
)r
)r�checkrrr�test_fnmatchs&











zFnmatchTestCase.test_fnmatchcCsD|�ttdd�|�ttdd�|�ttdd�|�ttdd�dS)N�test�*stestr)�assertRaises�	TypeErrorrr)rrrr�test_mix_bytes_str0sz"FnmatchTestCase.test_mix_bytes_strcCsz|j}|dddt�|dddt�|dddt�|dddt�|dddt�|dddt�|dddt�|dddt�dS)NrT�AbCFzusr/binzusr\bin)r
r)rrrrr�test_fnmatchcase6sz FnmatchTestCase.test_fnmatchcasecCs(|�dd�|�dd�|�dd�dS)Nstestste*stest�ste*�sfoo
barsfoo*)r
)rrrr�
test_bytesBszFnmatchTestCase.test_bytescCsNtj�d�tj�d�k}|j}|dd�|dd|�|dd|�|dd�dS)N�ABCrr)�os�path�normcaser
)r�
ignorecaserrrr�	test_caseGs
zFnmatchTestCase.test_casecCsNtj�d�tj�d�k}|j}|dd�|dd|�|dd|�|dd�dS)Nr�/zusr/binzusr\bin)rr r!r
)r�normseprrrr�test_sepOs
zFnmatchTestCase.test_sepc	Csft���Tt�dt�|j}|dd�|dd�|dd�|dd	�|d
d�|dd
�WdQRXdS)N�error�[z[[]�&z[a&&b]�|z[a||b]�~z[a~~b]�,z[a-z+--A-Z]�.z[a-z--/A-Z])�warnings�catch_warnings�simplefilter�Warningr
)rrrrr�
test_warningsWs





zFnmatchTestCase.test_warningsN)�__name__�
__module__�__qualname__rr
rrrrr#r&r2rrrrr	s
rc@seZdZdd�ZdS)�TranslateTestCasecCs�|�td�d�|�td�d�|�td�d�|�td�d�|�td	�d
�|�td�d�|�td
�d�|�td�d�dS)Nrz	(?s:.*)\Z�?z(?s:.)\Zza?b*z(?s:a.b.*)\Zz[abc]z(?s:[abc])\Zz[]]z
(?s:[]])\Zz[!x]z(?s:[^x])\Zz[^x]z(?s:[\^x])\Zz[xz
(?s:\[x)\Z)�assertEqualr)rrrr�test_translateesz TranslateTestCase.test_translateN)r3r4r5r9rrrrr6csr6c@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�FilterTestCasecCs@|�tddddgd�ddg�|�tdddd	gd
�ddg�dS)N�PythonZRubyZPerlZTclzP*sPythonsRubysPerlsTclsP*)r8r)rrrr�test_filterrs
zFilterTestCase.test_filtercCs(|�ttdgd�|�ttdgd�dS)Nrrstestr)rrr)rrrrrxsz!FilterTestCase.test_mix_bytes_strcCshtj�d�tj�d�k}|�tdddgd�|r6ddgndg�|�tdddgd�|r\ddgndg�dS)N�P�pzTest.pyzTest.rbzTest.PLz*.p*z*.P*)rr r!r8r)rr"rrrr#|s
zFilterTestCase.test_casecCshtj�d�tj�d�k}|�tdddgd�|r6ddgndg�|�tdddgd�|r\ddgndg�dS)Nrr$zusr/binZusrzusr\libzusr/*zusr\*)rr r!r8r)rr%rrrr&�s
zFilterTestCase.test_sepN)r3r4r5r<rr#r&rrrrr:psr:�__main__)�__doc__Zunittestrr.rrrrZTestCaserr6r:r3�mainrrrr�<module>sZ