Sindbad~EG File Manager

Current Path : /usr/local/lib/python3.9/test/__pycache__/
Upload File :
Current File : //usr/local/lib/python3.9/test/__pycache__/test_bool.cpython-39.pyc

a

��g�1�@sBddlZddlmZddlZGdd�dej�Zedkr>e��dS)�N)�supportc@s�eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9S):�BoolTestcCsHzGdd�dt�}Wnty&Yn0|�d�|�ttjtd�dS)Nc@seZdZdS)z!BoolTest.test_subclass.<locals>.CN)�__name__�
__module__�__qualname__�rr�*/usr/local/lib/python3.9/test/test_bool.py�Csr	zbool should not be subclassabler)�bool�	TypeErrorZfail�assertRaises�int�__new__)�selfr	rrr�
test_subclass
s
zBoolTest.test_subclassc	Cs�z�ttjd��}tdd|d�Wd�n1s20Yttjd�� }|�|��d�Wd�n1sn0YWt�tj�nt�tj�0dS)N�wFT)�file�rzFalse True
)�openr�TESTFN�print�assertEqual�read�os�remove)r�fo�firrr�
test_prints,0zBoolTest.test_printcCsL|�td�d�|�td�d�|�ttd��d�|�ttd��d�dS�NF�FalseT�True)r�repr�eval�rrrr�	test_reprszBoolTest.test_reprcCs$|�td�d�|�td�d�dSr)r�strr#rrr�test_str$szBoolTest.test_strcCsD|�td�d�|�td�d�|�td�d�|�td�d�dS)NFrT�)rr
�assertIsNotr#rrr�test_int(szBoolTest.test_intcCsD|�td�d�|�td�d�|�td�d�|�td�d�dS)NF�T��?)r�floatr(r#rrr�
test_float.szBoolTest.test_floatc	Cs*|�dd�|�dd�|�dd�|�dd�|�td�d�|�td�d�|�dd�|�dd�|�dd�|�td�d�|�td�d�|�dd�|�dd�|�dd�|�dd�|�dd�|�dd�|�dd�|�dd�|�dd�|�dd�|�dd�|�dd�|�dd�|�dd�|�dd�|�dd�|�dd�|�dd�|�dd�|�dd�|�dd�|�dd�|�dd�|�d	d�|�d	d�|�d
d�|�d
d�|�dd�|�dd�|�dd�|�dd�|�dd�|�dd�dD]F}dD]:}|�||t|�|�|�||tt|�|���q,�q$dD�]}dD�]�}|�||@tt|�t|�@��|�||Btt|�t|�B��|�||Att|�t|�A��|�|t|�@t|�t|�@�|�|t|�@tt|�t|�@��|�|t|�Bt|�t|�B�|�|t|�Btt|�t|�B��|�|t|�At|�t|�A�|�|t|�Att|�t|�A��|�t|�|@t|�t|�@�|�t|�|@tt|�t|�@��|�t|�|Bt|�t|�B�|�t|�|Btt|�t|�B��|�t|�|At|�t|�A�|�t|�|Att|�t|�A���qz�qp|�ddkd�|�ddkd�|�ddkd�|�ddkd�|�ddkd�|�ddkd�|�ddkd�|�ddkd�|�ddkd�|�ddkd�|�ddkd�|�ddkd�dg}|�||ud�|�||ud�|�d|vd�|�d|vd�|�d|vd�|�d|vd�ddi}|�||ud�|�||ud�|�d|vd�|�d|vd�|�d|vd�|�d|vd�|�dd�|�dd�dS)
NrFr'T��������r+r*)FT)rr'r0)rr(�absr
r
�assertIs)r�b�i�a�xrrr�	test_math4s�$

    $ $ $ $ $ ,zBoolTest.test_mathcCs�|�ttdd�|�td�d�|�td�d�|�td�d�|�td�d�|�td�d�|�td	�d�|�t�d�dS)
N�*�
Tr'r.rFZhello�)rrr
r3r#rrr�test_convert�szBoolTest.test_convertcCs:|�td��tdd�Wd�n1s,0YdS)Nzkeyword argumentr:)r7)ZassertRaisesRegexrr
r#rrr�test_keyword_args�szBoolTest.test_keyword_argscCsD|�ddd�|�ddd�|�ddd�|�ddd�dS)Nz%dF�0T�1z%x)rr#rrr�test_format�szBoolTest.test_formatcCs(|�tgd�d�|�tgd�d�dS)N�appendTZwobbleF)r3�hasattrr#rrr�test_hasattr�szBoolTest.test_hasattrcCs$|�tt�d�|�td�d�dS)NTr'F)r3�callable�lenr#rrr�
test_callable�szBoolTest.test_callablecCsp|�tdt�d�|�tdt�d�|�tdt�d�|�tdt�d�|�tdt�d�|�tdt�d�dS)NTFr'r)r3�
isinstancer
r
r#rrr�test_isinstance�szBoolTest.test_isinstancecCs(|�ttt�d�|�ttt�d�dS)NTF)r3�
issubclassr
r
r#rrr�test_issubclass�szBoolTest.test_issubclasscCs(|�divd�|�dddivd�dS)Nr'FT)r3r#rrr�
test_contains�szBoolTest.test_containscCs�|�d�d�d�|�d�d�d�|�d��d�|�d��d�|�d��d�|�d��d�|�d��d�|�d��d�|�d��d�|�d	��d�|�d��d�|�d��d�|�d��d�|�d��d�|�d
��d�|�d��d�|�d��d�|�d	��d�|�d
�	�d�|�d�	�d�|�d	�
�d�|�d�
�d�|�d�d�d�|�d�d�d�dS)NZxyz�zTr7FZxyz0123z@#$%Z0123ZXYZ� � u �X)r3�endswith�isalnum�isalpha�isdigit�islower�	isdecimal�	isnumeric�isspace�istitle�isupper�
startswithr#rrr�test_string�s0zBoolTest.test_stringcCsp|�dd�|�dt�|�dd�|�dd�|�dt�|�dd�|�dd�|�dt�|�dd�dS)Nr'TrF)rZassertNotIsInstancer
r3r#rrr�test_boolean�szBoolTest.test_booleanc	CslzXttjd��}|�|jd�Wd�n1s20Y|�|jd�Wt�tj�nt�tj�0dS)NrFT)rrrr3�closedrr)r�frrr�test_fileclosed�s
,zBoolTest.test_fileclosedcCs4tttttttttt	t
fD]}|�t|�d�qdS)NT)r
�complex�dictr,r
�list�object�setr%�tuple�typer3)r�trrr�
test_types�s�zBoolTest.test_typescCs�ddl}|�|�d�d�|�|�d�d�|�|�d�d�|�|�d�d�|�|�gd�d�|�|�dgd�d�|�|�dd�d�|�|�dd�d�|�|�dd�d�|�|�dd�d�|�|�dd�d�|�|�dd�d�dS)NrFr'T)�operatorr3�truth�not_�contains�lt�is_�is_not)rrirrr�
test_operatorszBoolTest.test_operatorcCs<ddl}|�|�|�d��d�|�|�|�d��d�dS)NrTF)�marshalr3�loads�dumps)rrqrrr�test_marshalszBoolTest.test_marshalc	CsTddl}t|jd�D]8}|�|�|�d|��d�|�|�|�d|��d�qdS)Nrr'TF)�pickle�range�HIGHEST_PROTOCOLr3rrrs)rru�protorrr�test_pickleszBoolTest.test_picklecCs�ddl}|�|jddd�d�|�|jddd�d�|�|jddd�d�|�|jddd�d�|�|jddd�d	�|�|jddd�d
�dS)NrT)�protocolsI01
.FsI00
.r'r0s��.s��.)rurrs)rrurrr�test_picklevaluesszBoolTest.test_picklevaluescs��fdd�}Gdd�dt�}||��Gdd�dt�}||��Gdd�dt�}||��Gd	d
�d
t�}||��Gdd�d�}��tt|��dS)
Ncs��tt|�S�N�rrr
)�or#rr�<lambda>*�z/BoolTest.test_convert_to_bool.<locals>.<lambda>c@seZdZdd�ZdS)z*BoolTest.test_convert_to_bool.<locals>.FoocSs|Sr|rr#rrr�__bool__,sz3BoolTest.test_convert_to_bool.<locals>.Foo.__bool__N�rrrr�rrrr�Foo+sr�c@seZdZdd�ZdS)z*BoolTest.test_convert_to_bool.<locals>.BarcSsdS)NZYesrr#rrrr�1sz3BoolTest.test_convert_to_bool.<locals>.Bar.__bool__Nr�rrrr�Bar0sr�c@seZdZdd�ZdS)z*BoolTest.test_convert_to_bool.<locals>.BazcSs|Sr|rr#rrrr�6sz3BoolTest.test_convert_to_bool.<locals>.Baz.__bool__Nr�rrrr�Baz5sr�c@seZdZdd�ZdS)z+BoolTest.test_convert_to_bool.<locals>.SpamcSsdS)Nr'rr#rrrr�<sz4BoolTest.test_convert_to_bool.<locals>.Spam.__bool__Nr�rrrr�Spam;sr�c@seZdZdd�ZdS)z+BoolTest.test_convert_to_bool.<locals>.EggscSsdS)Nr.rr#rrr�__len__Asz3BoolTest.test_convert_to_bool.<locals>.Eggs.__len__N�rrrr�rrrr�Eggs@sr�)rcr
r�
ValueErrorr
)r�checkr�r�r�r�r�rr#r�test_convert_to_bool&s



zBoolTest.test_convert_to_boolcCs,|�t�dd�d�|�t�dd�d�dS)Ns�bigFsabcd�littleT)r3r
�
from_bytesr#rrr�test_from_bytesEszBoolTest.test_from_bytescs�dD]��G�fdd�d�}zt|��Wqty�}zTzt|��Wn8ty~}z |�t|�t|��WYd}~n
d}~00WYd}~qd}~00qdS)N)Zillegalr.lcseZdZ�fdd�ZdS)z!BoolTest.test_sane_len.<locals>.Acs�Sr|rr#�Zbadvalrrr�Nsz)BoolTest.test_sane_len.<locals>.A.__len__Nr�rr�rr�AMsr�)r
�	ExceptionrErr%)rr�Ze_boolZe_lenrr�r�
test_sane_lenIszBoolTest.test_sane_lencCs@Gdd�d�}|�tt|��Gdd�d�}|�tt|��dS)Nc@seZdZdZdS)z BoolTest.test_blocked.<locals>.ANr�rrrrr�Ysr�c@seZdZdd�ZdZdS)z BoolTest.test_blocked.<locals>.BcSsdS)Nr:rr#rrrr�^sz(BoolTest.test_blocked.<locals>.B.__len__N)rrrr�r�rrrr�B]sr�r})rr�r�rrr�test_blockedXszBoolTest.test_blockedcCs�|�djd�|�djd�|�tdj�t�|�tdj�t�|�djd�|�djd�|�tdj�t�|�tdj�t�dS)NTr'rF)r�real�imagr3rfr
r#rrr�test_real_and_imagcszBoolTest.test_real_and_imagN)rrrrrr$r&r)r-r8r<r=r@rCrFrHrJrKr[r\r_rhrprtryr{r�r�r�r�r�rrrrrs8	m


r�__main__)Zunittest�testrrZTestCaserr�mainrrrr�<module>sh

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists