Your IP : 216.73.216.196


Current Path : /opt/alt/python310/lib64/python3.10/test/__pycache__/
Upload File :
Current File : //opt/alt/python310/lib64/python3.10/test/__pycache__/test_keyword.cpython-310.opt-1.pyc

o

0�i��@s:ddlZddlZGdd�dej�Zedkre��dSdS)�Nc@sdeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dS)�Test_iskeywordcC�|�t�d��dS)N�True)Z
assertTrue�keyword�	iskeyword��self�r	�8/opt/alt/python310/lib64/python3.10/test/test_keyword.py�test_true_is_a_keyword�z%Test_iskeyword.test_true_is_a_keywordcCr)NZTRUE��assertFalserrrr	r	r
�$test_uppercase_true_is_not_a_keyword	rz3Test_iskeyword.test_uppercase_true_is_not_a_keywordcCs|�t�d��dS�Nr
rr	r	r
� test_none_value_is_not_a_keywordrz/Test_iskeyword.test_none_value_is_not_a_keywordcC�4tj}|�ttd|�gd�t_|�t�d��dS)N�kwlist)Zits�all�eggsZbeans�and�a�slicer)rr�
addCleanup�setattrrr�rZoldlistr	r	r
�2test_changing_the_kwlist_does_not_affect_iskeyword�
zATest_iskeyword.test_changing_the_kwlist_does_not_affect_iskeywordcCr)N�
softkwlist)ZfooZbar�spamZegs�caser)rrrrr�
issoftkeywordrr	r	r
�:test_changing_the_softkwlist_does_not_affect_issoftkeywordrzITest_iskeyword.test_changing_the_softkwlist_does_not_affect_issoftkeywordc	CsHtjD]}|�t��t|�d��Wd�n1swYqdS�Nz = 42)rrZassertRaises�SyntaxError�exec�r�keyr	r	r
�*test_all_keywords_fail_to_be_used_as_namess
���z9Test_iskeyword.test_all_keywords_fail_to_be_used_as_namescCstjD]	}t|�d��qdSr#)rrr%r&r	r	r
�+test_all_soft_keywords_can_be_used_as_names"s
�z:Test_iskeyword.test_all_soft_keywords_can_be_used_as_namescCs |�dtj�|�dtj�dS)N�async�await)�assertInrrrr	r	r
�!test_async_and_await_are_keywords&sz0Test_iskeyword.test_async_and_await_are_keywordscCs.|�dtj�|�dtj�|�dtj�dS)N�matchr �_)r,rrrr	r	r
�%test_match_and_case_are_soft_keywords*sz4Test_iskeyword.test_match_and_case_are_soft_keywordscC�|�ttj�tj�dSr)�assertListEqual�sortedrrrr	r	r
�test_keywords_are_sorted/�z'Test_iskeyword.test_keywords_are_sortedcCr1r)r2r3rrrr	r	r
�test_softkeywords_are_sorted2r5z+Test_iskeyword.test_softkeywords_are_sortedN)�__name__�
__module__�__qualname__rrrrr"r(r)r-r0r4r6r	r	r	r
rsr�__main__)rZunittestZTestCaserr7�mainr	r	r	r
�<module>s1�