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: //usr/local/lib/python3.7/test/__pycache__/test_dictviews.cpython-37.opt-1.pyc
B

��g�.�@sNddlZddlZddlZddlZddlZGdd�dej�ZedkrJe�	�dS)�Nc@s|eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�ZdS)�DictSetTestcCsvti���}|�t|i�|�t|�ti���}|�t|i�|�t|�ti���}|�t|i�|�t|�dS)N)�type�keys�assertRaises�	TypeError�items�values)�selfZkt�itZvt�r�//usr/local/lib/python3.7/test/test_dictviews.py�test_constructors_not_callable	sz*DictSetTest.test_constructors_not_callablecCsddd�}|��}|�t|�d�|�t|�ddh�|�|ddh�|�|dddh�|�|ddh�|�|dh�|�|d�|�d|�|�d|�|�d|�|�d	|�|�|��|���d
dd�}|�|��|���|d=|�|��|���dS)N�
�ABC)��a�rr�b�*�Z��def)r�assertEqual�len�set�assertNotEqual�assertIn�assertNotIn)r	�dr�errr�test_dict_keyss$

zDictSetTest.test_dict_keyscCs&ddd�}|��}|�t|�d�|�t|�ddh�|�|ddh�|�|dddh�|�|ddh�|�|dh�|�|d	�|�d|�|�d|�|�d
|�|�d|�|�d|�|�d
|�|�d|�|�|��|���|��}|�|��|���d|d<|�|��|���dS)Nrr)rrr)rr)rrZjunk)rrr)rrrr)r)rr�rr)rrrrrrr�copy)r	rrrrrr�test_dict_items(s*
zDictSetTest.test_dict_itemscCs@ddd�}ddd�}|�|��|���|�|��|���dS)Nr�))rr)rrrr)rr)rrrr)r	rrrrr�test_dict_mixed_keys_items?s

z&DictSetTest.test_dict_mixed_keys_itemscCs:ddd�}|��}|�t|�ddh�|�t|�d�dS)Nrr)rrr)rrrr)r	rrrrr�test_dict_valuesEs
zDictSetTest.test_dict_valuescCs�ddd�}|�t|�t�t|���}|�|t�|�|dkpD|dk�t|���}|�|t�|�|dkpr|dk�t|���}|�|t�|�|dkp�|d	k�dS)
Nrr)rrz#dict_items([('a', 'ABC'), (1, 10)])z#dict_items([(1, 10), ('a', 'ABC')])zdict_keys(['a', 1])zdict_keys([1, 'a'])zdict_values(['ABC', 10])zdict_values([10, 'ABC']))�assertIsInstance�repr�strr�
assertTruerr)r	r�rrrr�test_dict_reprKs


zDictSetTest.test_dict_reprcCs�ddd�}ddd�}ddd�}|�|��|��@d	d
h�|�|��|��@d
h�|�|��|��@t��|�|��t|���@d	d
h�|�|��t|���@d
h�|�|��t|���@t��|�|��t|���@d	d
h�|�|��|��Bd	d
h�|�|��|��Bd	d
dh�|�|��|��Bd	d
dd
h�|�|��t|���Bd	d
h�|�|��t|���Bd	d
dh�|�|��t|���Bd	d
dd
h�|�|��dBd	d
ddh�|�|��|��At��|�|��|��Ad	dh�|�|��|��Ad	d
dd
h�|�|��t|���At��|�|��t|���Ad	dh�|�|��t|���Ad	d
dd
h�|�|��t|���Ad	dh�|�|��|��t��|�|��|��d	h�|�|��|��d	d
h�|�|��t|���t��|�|��t|���d	h�|�|��t|���d	d
h�|�|��dd	d
h�|�|���|����|�|���|����|�|���t|�����|�|���t|�����|�|���dddh��|�|���dddg��|�|���tdddg���|�|���tddg���|�|���ddg��|�|���i��|�|���|����i}|�|���t���|�|���g��|�|���|����|�|���dg��dS)Nrr)rrr!)r�c��)rrrrr-rr)rr)rr�x�y�z)rrr�tuple�assertFalse�
isdisjoint�listr*)r	�d1�d2�d3�derrr�test_keys_set_operations[sb


    "    z$DictSetTest.test_keys_set_operationscCs�ddd�}ddd�}ddd�}|�|��|��@ddh�|�|��|��@dh�|�|��|��@t��|�|��t|���@ddh�|�|��t|���@dh�|�|��t|���@t��|�|��|��Bddh�|�|��|��Bdd	dh�|�|��|��Bddd
dh�|�|��t|���Bddh�|�|��t|���Bdd	dh�|�|��t|���Bddd
dh�|�|��|��At��|�|��|��Add	h�|�|��|��Addd
dh�|�|��|��t��|�|��|��dh�|�|��|��ddh�|�|��t|���t��|�|��t|���dh�|�|��t|���ddh�|�|���|����|�|���|����|�|���t|�����|�|���t|�����|�|���dd
dh��|�|���dd
dg��|�|���tdd
dg���|�|���tdd
g���|�|���i��|�|���|����i}|�|���t���|�|���g��|�|���|����|�|���dg��dS)Nrr)rrr.r/)rr)rr)rr)rr)rr.)rr/r0r1r2)rrrr4r5r6r*)r	r7r8r9r:rrr�test_items_set_operations�sb






 z%DictSetTest.test_items_set_operationscCsHi}|��|d<t|�}|�|t�|��|d<t|�}|�|t�dS)Nr)rr(r'r)r)r	rr+rrr�test_recursive_repr�szDictSetTest.test_recursive_reprcCs<i}x$tt��d�D]}d|��i}qW|�tt|�dS)N�dr)�range�sys�getrecursionlimitrr�RecursionErrorr()r	r�irrr�test_deeply_nested_repr�sz#DictSetTest.test_deeply_nested_reprcCsJddd�}|�ttj|���|�ttj|���|�ttj|���dS)Nrr)rr)rrr"rrr)r	rrrr�	test_copy�s
zDictSetTest.test_copyc	sGdd�dt��G�fdd�d�}|�|�}}|�|�}}||i}|�||�|�||���|�||���|�||f|���|��|j|�|��|��j|�|��|��j||f�|��|��j||f�|����||��kWdQRXdS)Nc@seZdZdS)z+DictSetTest.test_compare_error.<locals>.ExcN)�__name__�
__module__�__qualname__rrrr�Exc�srIcs eZdZdd�Z�fdd�ZdS)z-DictSetTest.test_compare_error.<locals>.BadEqcSsdS)N�r)r	rrr�__hash__�sz6DictSetTest.test_compare_error.<locals>.BadEq.__hash__cs��dS)Nr)r	�other)rIrr�__eq__�sz4DictSetTest.test_compare_error.<locals>.BadEq.__eq__N)rFrGrHrKrMr)rIrr�BadEq�srN)�	Exceptionrrrrr�__contains__)r	rNZk1Zk2Zv1Zv2rr)rIr�test_compare_error�szDictSetTest.test_compare_errorcCszddd�}xjttjd�D]X}|�ttjftj|��|�|�ttjftj|��|�|�ttjftj|�	�|�qWdS)Nrr)rrr)
r?�pickleZHIGHEST_PROTOCOLrrZ
PicklingError�dumpsrrr)r	r�protorrr�test_pickle�s
zDictSetTest.test_picklecCs:tdd�}|�|��tjj�|�|��tjj�|�|��tjj�|�|��tjj�|�|��tjj	�|�|��tjj
�|�|��tjj�|�|��tjj�|�|��tjj�|�|�
�tjj�|�|�
�tjj�|�|�
�tjj�|�|�
�tjj�|�|�
�tjj	�|�|�
�tjj
�dS)Nr)r)�dictr'r�collections�abc�KeysView�MappingView�Set�Sized�Iterable�	Containerr�
ValuesViewr�	ItemsView)r	rrrr�test_abc_registrys 
zDictSetTest.test_abc_registryN)rFrGrHr
r r#r%r&r,r;r<r=rDrErQrUrarrrrrs88

r�__main__)
Zcollections.abcrWr"rRr@ZunittestZTestCaserrF�mainrrrr�<module>s