o
    IXîhà  ã                   @   sJ   d dl mZ d dlmZ d dlZG dd„ dejƒZedkr#e ¡  dS dS )é    )ÚUserList)Ú
list_testsNc                       sd   e Zd ZeZ‡ fdd„Zdd„ Zdd„ Zdd„ Z‡ fd	d
„Z	dd„ Z
dd„ Zdd„ Zdd„ Z‡  ZS )ÚUserListTestc                    s”   t ƒ  ¡  g d¢}|  |¡}tddƒD ]4}|  |d |… |d |… ¡ |  ||d … ||d … ¡ tddƒD ]}|  |||… |||… ¡ q6qd S )N©r   é   é   é   é   éýÿÿÿé   )ÚsuperÚtest_getsliceÚ	type2testÚrangeÚassertEqual)ÚselfÚlÚuÚiÚj©Ú	__class__© ú</opt/python-3.10.19/usr/lib/python3.10/test/test_userlist.pyr   
   s   

ÿýzUserListTest.test_getslicec                 C   s>   g d¢}t |ƒ}|  |d d … |j¡ |  |d d … |¡ d S )Nr   )r   ZassertIsInstancer   r   )r   r   r   r   r   r   Útest_slice_type   s   zUserListTest.test_slice_typec                 C   s$   t dƒ}|d }|  |tdƒ¡ d S )NÚspamÚeggsÚspameggs)r   r   Úlist©r   r   Úu2r   r   r   Útest_add_specials   s   zUserListTest.test_add_specialsc                 C   sB   t dƒ}d| }|  |tdƒ¡ | t dƒ¡}|  |tdƒ¡ d S )Nr   r   r   )r   r   r   Ú__radd__r   r   r   r   Útest_radd_specials   s
   zUserListTest.test_radd_specialsc                    s6   t ƒ  ¡  ddg}|tddgƒ7 }|  |g d¢¡ d S )Nr   r   )r   r   r   r   )r   Ú	test_iaddr   r   ©r   r   r   r   r   r$   &   s   
zUserListTest.test_iaddc                 C   s@   |   ddg¡}|  |ddg¡ |  |dg¡ |  |ddg¡ d S )Nr   r   r   )r   r   ZassertNotEqualr%   r   r   r   Útest_mixedcmp,   s   zUserListTest.test_mixedcmpc                 C   s8   |   ddg¡}|  |g  |¡ |  |dg g d¢¡ d S )Nr   r   r   )r   r   r   )r   r   r%   r   r   r   Útest_mixedadd2   s   zUserListTest.test_mixedaddc                 C   s.   G dd„ d| j ƒ}|  tt|dƒƒƒd¡ d S )Nc                   @   s   e Zd Zdd„ ZdS )z1UserListTest.test_getitemoverwriteiter.<locals>.Tc                 S   s   t |ƒd S )Nz!!!)Ústr)r   Úkeyr   r   r   Ú__getitem__:   s   z=UserListTest.test_getitemoverwriteiter.<locals>.T.__getitem__N)Ú__name__Ú
__module__Ú__qualname__r*   r   r   r   r   ÚT9   s    r.   )r   r   z0!!!)r   r   ÚnextÚiter)r   r.   r   r   r   Útest_getitemoverwriteiter7   s   z&UserListTest.test_getitemoverwriteiterc                 C   s:   |   g d¢¡}| ¡ }|  ||¡ |  t|ƒt|ƒ¡ d S )N)r   é   r   é	   r   )r   Úcopyr   Útype)r   r   Úvr   r   r   Útest_userlist_copy>   s   zUserListTest.test_userlist_copy)r+   r,   r-   r   r   r   r   r!   r#   r$   r&   r'   r1   r7   Ú__classcell__r   r   r   r   r      s    
r   Ú__main__)	Úcollectionsr   Útestr   ZunittestZ
CommonTestr   r+   Úmainr   r   r   r   Ú<module>   s   =ÿ