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_unicodedata.cpython-38.opt-2.pyc
U

>��g�2�@s�ddlZddlZddlZddlmZdZdZGdd�dej�ZGdd�dej�Z	Gd	d
�d
e	�Z
Gdd�de	�Zed
kr�e�
�dS)�N)�
script_helperzutf-8�
surrogatepassc@seZdZdZdd�ZdS)�UnicodeMethodsTestZ(9129d6f2bdf008a81c2476e5b5127014a62130c1cCsht��}td�D�]:}t|�}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��g}|�d�|��tt��q|��}|�||j�dS)N�Z01�abcZ123z 	�ABC�)�hashlib�sha1�range�chr�isalnum�isalpha�	isdecimal�isdigit�islower�	isnumeric�isspace�istitle�isupper�lower�upper�title�update�join�encode�encoding�errors�	hexdigest�assertEqual�expectedchecksum)�self�h�i�char�data�result�r'�4/opt/cppython/lib/python3.8/test/test_unicodedata.py�test_method_checksums@












�#z'UnicodeMethodsTest.test_method_checksumN)�__name__�
__module__�__qualname__r r)r'r'r'r(rsrc@seZdZdd�Zdd�ZdS)�UnicodeDatabaseTestcCsddl}||_dS)Nr)�unicodedata�db�r!r.r'r'r(�setUpFszUnicodeDatabaseTest.setUpcCs|`dS)N)r/�r!r'r'r(�tearDownLszUnicodeDatabaseTest.tearDownN)r*r+r,r1r3r'r'r'r(r-Dsr-c@s�eZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd�Zd S)!�UnicodeFunctionsTestZ(c44a49ca7c5cb6441640fe174ede604b45028652cCs�g}t��}td�D]�}t|�}t|j�|d�d�t|j�|d�d�t|j�|d�d�|j�	|�|j�
|�|j�|�t|j�
|��t|j�|��g}|�d�|��d��q|��}|�||j�dS)Nr���z.12gr�ascii)r	r
rr�formatr/�digit�numeric�decimal�category�
bidirectional�
decomposition�str�mirrored�	combiningrrrrrr )r!r%r"r#r$r&r'r'r(�test_function_checksumTs 


�z+UnicodeFunctionsTest.test_function_checksumcCs�|�|j�dd�d�|�|j�d�d�|�|j�dd�d�|�|j�d�d�|�|j�dd�d�|�|j�d�d�|�t|jj�|�t|jjd	�|�t|jjd
�dS�N�A�9�	�⅛�⑨�𠀀u𝟽��xx�x)rr/r8�assertRaises�	TypeError�
ValueErrorr2r'r'r(�
test_digitiszUnicodeFunctionsTest.test_digitcCs�|�|j�dd�d�|�|j�d�d�|�|j�d�d�|�|j�d�d�|�|j�d�d	�|�|j�d
d�d�|�|j�d�d�|�t|jj�|�t|jjd
�|�t|jjd�dS)NrCrDrErFg�?rGg"@u꘧g@rH�𐄪i(#rJrK)rr/r9rLrMrNr2r'r'r(�test_numericusz!UnicodeFunctionsTest.test_numericcCs�|�|j�dd�d�|�|j�d�d�|�|j�dd�d�|�|j�dd�d�|�|j�dd�d�|�|j�d�d�|�t|jj�|�t|jjd	�|�t|jjd
�dSrB)rr/r:rLrMrNr2r'r'r(�test_decimal�sz!UnicodeFunctionsTest.test_decimalcCs�|�|j�d�d�|�|j�d�d�|�|j�d�d�|�|j�d�d�|�|j�d	�d
�|�t|jj�|�t|jjd�dS)N�￾ZCn�aZLlrCZLurHZLorPZNorJ)rr/r;rLrMr2r'r'r(�
test_category�sz"UnicodeFunctionsTest.test_categorycCsv|�|j�d�d�|�|j�d�d�|�|j�d�d�|�|j�d�d�|�t|jj�|�t|jjd�dS)	NrSr� ZWSrC�LrHrJ)rr/r<rLrMr2r'r'r(�test_bidirectional�sz'UnicodeFunctionsTest.test_bidirectionalcCsN|�|j�d�d�|�|j�d�d�|�t|jj�|�t|jjd�dS)NrSr�¼z<fraction> 0031 2044 0034rJ)rr/r=rLrMr2r'r'r(�test_decomposition�sz'UnicodeFunctionsTest.test_decompositioncCsv|�|j�d�d�|�|j�d�d�|�|j�d�d�|�|j�d�d�|�t|jj�|�t|jjd�dS)NrSrrTu∁�rHrJ)rr/r?rLrMr2r'r'r(�
test_mirrored�sz"UnicodeFunctionsTest.test_mirroredcCsv|�|j�d�d�|�|j�d�d�|�|j�d�d�|�|j�d�d�|�t|jj�|�t|jjd�dS)NrSrrTu⃡��rHrJ)rr/r@rLrMr2r'r'r(�test_combining�sz#UnicodeFunctionsTest.test_combiningcCs>|�t|jj�|�t|jjdd�|�|j�dd�d�dS)N�unknownrJZNFKCr)rLrMr/�	normalizerNrr2r'r'r(�test_normalize�sz#UnicodeFunctionsTest.test_normalizecCs(d}|D]}|�|j�d|�|�qdS)N)uେ̀ାuᄀ̀ᅡuLi̍t-sṳ́u.मार्क ज़ुकेरबर्गu'किर्गिज़स्तान�NFC�rr/r`)r!Zcomposed�textr'r'r(�	test_pr29�szUnicodeFunctionsTest.test_pr29cCs"d}d}|�|j�d|�|�dS)Nu?C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸Çu>C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸C̸Çrbrc)r!rT�br'r'r(�test_issue10254�sz$UnicodeFunctionsTest.test_issue10254cCs^d}d}d}d}d}d}|�|j�d|�|�|�|j�d|�|�|�|j�d|�|�dS)Nu	ᄀᅶᆨu	기ᆧu기ᆧu	기ᇃu기ᇃrbrc)r!Zu1176_str_aZu1176_str_bZu11a7_str_aZu11a7_str_bZu11c3_str_aZu11c3_str_br'r'r(�test_issue29456�sz$UnicodeFunctionsTest.test_issue29456cCs�|jj}|�t|d�|�t|t��|�t|d�|�t|d�|�|d�d�|�|d�d�|�|d�d	�|�|d
�d�|�|d�d
�|�|d�d�|�|d�d	�dS)N�arZra��NrVZNau좔�Wuヲ�Hu?�Fu‐rCrH)r/�east_asian_widthrLrM�	bytearrayr)r!Zeawr'r'r(�test_east_asian_width�sz*UnicodeFunctionsTest.test_east_asian_widthcCs.|�|jj�d�d�|�|j�d�d�dS)Nu⌚rkrl)rr/�	ucd_3_2_0ror2r'r'r(�!test_east_asian_width_9_0_changes�sz6UnicodeFunctionsTest.test_east_asian_width_9_0_changesN)r*r+r,r rArOrQrRrUrXrZr\r^rarergrhrqrsr'r'r'r(r4Os 

			r4c@sLeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)�UnicodeMiscTestcCs,d}t�d|�}d}|�||j�d��dS)NzGimport sys;sys.modules['unicodedata'] = None;eval("'\\N{SOFT HYPHEN}'")z-czUSyntaxError: (unicode error) \N escapes not supported (can't load unicodedata module)r6)rZassert_python_failureZassertIn�err�decode)r!�coder&�errorr'r'r(�#test_failed_import_during_compiling�sz3UnicodeMiscTest.test_failed_import_during_compilingcCs^d}td�D]>}t|�}|j�|d�}|dkr|�||j�|��|d7}q|�|dk�dS�Nrrr5r[�
)rrr/r:rr9�
assertTrue�r!�countr#�cZdecr'r'r(�test_decimal_numeric_consistents
z/UnicodeMiscTest.test_decimal_numeric_consistentcCs^d}td�D]>}t|�}|j�|d�}|dkr|�||j�|��|d7}q|�|dk�dSrz)rrr/r8rr9r|r}r'r'r(�test_digit_numeric_consistents
z-UnicodeMiscTest.test_digit_numeric_consistentcCs|�|j�d�d�dS)NzGOTHIC LETTER FAIHUu𐍆)rr/�lookupr2r'r'r(�test_bug_1704793 sz UnicodeMiscTest.test_bug_1704793cCsfddl}|�|�d��|�|j�d��|�d��dk�|�d��dk�|�d��dk�dS)Nru༺rTrC�ᵹuꝽ�.)r.r|r?rrrr0r'r'r(�test_ucd_510#szUnicodeMiscTest.test_ucd_510cCs6|�d��d�|�dd�ttjd�D�dg�dS)Nr�cSs8g|]0}dt|���t|���t|���kr|�qS)�)rrrr)�.0rr'r'r(�
<listcomp>2s(�z1UnicodeMiscTest.test_bug_5828.<locals>.<listcomp>r[r)rrr�sys�
maxunicoder2r'r'r(�
test_bug_5828.s��zUnicodeMiscTest.test_bug_5828cCs4|�d��d�|�d��d�|�d��d�dS)NuDŽuDžudž)rrr2r'r'r(�
test_bug_49719szUnicodeMiscTest.test_bug_4971cCsXtd�D]J}t|�d��}|dkr<|�t|�dd|�q|�t|�dd|�qdS)NrrC)
r{���
����i( i) �z\u%.4x should be a linebreakr[z \u%.4x should not be a linebreak)rr�
splitlinesr�len)r!r#�linesr'r'r(�test_linebreak_7643?s��z#UnicodeMiscTest.test_linebreak_7643N)r*r+r,ryr�r�r�r�r�r�r�r'r'r'r(rt�s

rt�__main__)r�Zunittestr	Ztest.supportrrrZTestCaserr-r4rtr*�mainr'r'r'r(�<module>	s0&V

F1le Man4ger