Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/test/__pycache__/test_mailcap.cpython-38.opt-1.pyc
U

>��g(�@sZddlZddlZddlZddlZddlZej�d�Zdddddd�gd	d
dd�gd
d
dddd�gddd�gd	ddd�dddd�gddd�gddd	dd d!�gd"d	d#d$d%�gd&d'd�gd(d)d�gd*d+d�gd,d-dd.�gd&d/d�gd0�
Z	e�
e	�Ze��D]Z
e
D]Ze�d1�q�q�Gd2d3�d3ej�ZGd4d5�d5ej�ZGd6d7�d7ej�Zed8k�rVe��dS)9�Nzmailcap.txtz
moviemaker %sz""/usr/lib/Zmail/bitmaps/movie.xbm"z"Movie"zmovieplayer %s�)�composez
x11-bitmap�description�view�lineno�z?echo "This is \"%t\" but        is 50 \% Greek to me" \; cat %s�)�
copiousoutputrr�audiocompose %s�"An audio fragment"�showaudio %s���editrrrr�mpeg_play %s�
�rrzps-to-terminal %s�)�
needsterminalrrzidraw %s�)rrrzxdvi %s��
extcompose %s�4"A reference to data stored in an external location"�Qshowexternal %s %{access-type} %{name} %{site}     %{directory} %{mode} %{server}�
�Zcomposetypedrrrrz?test "`echo     %{charset} | tr '[A-Z]' '[a-z]'`"  = iso-8859-8z)shownonascii iso-8859-8 -e richtext -p %s�)�testr	rrz
display %s�	�/usr/local/bin/showaudio %t��
animate %s�z
"cat %s | lp"zshowframe %s)�printrr�)
zapplication/x-moviez
application/*�audio/basic�
video/mpegzapplication/postscriptzapplication/x-dvi�message/external-bodyz
text/richtextzimage/x-xwindowdump�audio/*�video/*zapplication/framez	image/rgbrc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�HelperFunctionTestc	Cs�t��}|�|t�|D]}|�|t�qtj���@}d|krP|d�t	j
�}n ddg}t	j
�|�|d<t��}W5QRX|�||�dS)N�MAILCAPSz/testdir1/.mailcapz/testdir2/mailcap)
�mailcap�listmailcapfiles�assertIsInstance�list�strr�support�EnvironmentVarGuard�split�os�pathsep�join�assertEqual)�selfZmcfiles�m�envZenv_mailcaps�r;�0/opt/cppython/lib/python3.8/test/test_mailcap.py�test_listmailcapfilesEsz(HelperFunctionTest.test_listmailcapfilesc
CsFttd��&}|�t��t�|�}W5QRXW5QRX|�|t�dS)N�r)�open�MAILCAPFILEZassertWarns�DeprecationWarningr,Zreadmailcapfile�assertDictEqual�MAILCAPDICT_DEPRECATED)r8�mcf�dr;r;r<�test_readmailcapfileXsz'HelperFunctionTest.test_readmailcapfilecCs�ddd�ddd�g}t�td�}|�||�d}ddd	d
dd�g}t�td
|�}|�||�ddiddig}t�td�}|�||�dS)Nr!r"rrrr&rr
rrr
rr%r)r,�lookup�MAILCAPDICTZassertListEqualrC)r8Zexpected�actual�keyr;r;r<�test_lookup_s"��zHelperFunctionTest.test_lookupcCs�dddg}dddgdfdddgdfdddgd	fd
ddgdfd
ddgdfd
ddgd
fddd|gdfddd|gdfg}|D]}|�tj|d�|d�qvdS)Nzid=1znumber=2ztotal=3rr(�foo.txtzecho foozecho %szecho foo.txtzecho %t�	audio/wavzecho audio/wavzecho \%tz
echo %{total}zecho 3rr)r7r,Zsubst)r8�plistZ
test_casesZtcr;r;r<�
test_substus
�
zHelperFunctionTest.test_substN)�__name__�
__module__�__qualname__r=rFrKrOr;r;r;r<r*Csr*c@seZdZdd�Zdd�ZdS)�GetcapsTestc	Cs6tj���"}t|d<t��}|�|t�W5QRXdS)Nr+)rr1r2r@r,�getcapsrBrH)r8r:�capsr;r;r<�test_mock_getcaps�szGetcapsTest.test_mock_getcapscCs�t��}|�|t�t��}dd�|D�}|rp|��D]6\}}|�|t�|�|t�|D]}|�|t�qZq6n|�i|�dS)NcSsg|]}tj�|�r|�qSr;)r4�path�exists)�.0rDr;r;r<�
<listcomp>�sz3GetcapsTest.test_system_mailcap.<locals>.<listcomp>)	r,rTr.�dictr-�itemsr0r/r7)r8rUZmailcapfilesZexistingmcfiles�k�v�er;r;r<�test_system_mailcap�szGetcapsTest.test_system_mailcapN)rPrQrRrVr`r;r;r;r<rS�s	rSc@s6eZdZdd�Ze�ejdkd�dd��Zdd�Z	d	S)
�
FindmatchTestc	CsJt}d}ddddddg}ddd	d
dd�}d
dd�}ddd�}dddddd�}idgidf|dgidf|dgid|ff|ddgid|ff|ddgid|ff|dd gid	|ff|dd!gidf|d"gd#|id||ff|ddgd#|id||ff|dgd |d$�d	|ff|d%gd#|idf|d&gd#|id'|ff|d(gd)|id*|ffg
}|�|�dS)+NrLzaccess-type=defaultz	name=johnzsite=python.orgzdirectory=/tmpzmode=fooz
server=barr
rrr
rrr rr!r"rrrrrrr&�NNzfoo/barzanimate /dev/nullr%rzaudiocompose /dev/nullrrZfoobarr)�filename)rJrcr(rMz"/usr/local/bin/showaudio audio/wavr'rNz?showexternal /dev/null default john python.org     /tmp foo bar)rH�
_run_cases)	r8�cZfnamerNZaudio_basic_entryZaudio_entryZvideo_entryZ
message_entry�casesr;r;r<�test_findmatch�sf��

�
������zFindmatchTest.test_findmatch�posixz!Requires 'test' command on systemcCsLddigddigd�}|ddgidddiff|ddgidfg}|�|�dS)Nrztest 1 -eq 1ztest 1 -eq 0)�	test/pass�	test/failrirjrb)rd)r8rUrfr;r;r<�	test_test�s��zFindmatchTest.test_testcCs.|D]$}|�tj|d|d�|d�qdS)Nrrr)r7r,Z	findmatch)r8rfrer;r;r<rd�szFindmatchTest._run_casesN)
rPrQrRrg�unittestZ
skipUnlessr4�namerkrdr;r;r;r<ra�s6
ra�__main__)r,r4�copyZtest.supportrrlr1Zfindfiler@rH�deepcopyrC�valuesZ
entry_list�entry�popZTestCaser*rSrarP�mainr;r;r;r<�<module>sh���


�
��



�1
CO


F1le Man4ger