B
    18™\:  ã               @   sF   d dl mZ d dlmZ d dlZG dd„ dejƒZedkrBe ¡  dS )é    )ÚUserList)Ú
list_testsNc                   s\   e Zd ZeZ‡ f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 ƒ  ¡  dddddg}|  |¡}xztddƒD ]l}|  |d |… |d |… ¡ |  ||d … ||d … ¡ x.tddƒD ] }|  |||… |||… ¡ qvW q.W d S )Nr   é   é   é   é   éýÿÿÿé   )ÚsuperÚtest_getsliceÚ	type2testÚrangeÚassertEqual)ÚselfÚlÚuÚiÚj)Ú	__class__© úV/oak/stanford/groups/akundaje/marinovg/programs/Python-3.7.3/Lib/test/test_userlist.pyr   
   s    

zUserListTest.test_getslicec             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   r   r   Útest_radd_specials   s
    zUserListTest.test_radd_specialsc                s:   t ƒ  ¡  ddg}|tddgƒ7 }|  |ddddg¡ d S )Nr   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   ÚassertNotEqual)r   r   r   r   r   Útest_mixedcmp&   s    zUserListTest.test_mixedcmpc             C   s:   |   ddg¡}|  |g  |¡ |  |dg dddg¡ d S )Nr   r   r   )r   r   )r   r   r   r   r   Útest_mixedadd,   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__4   s    z=UserListTest.test_getitemoverwriteiter.<locals>.T.__getitem__N)Ú__name__Ú
__module__Ú__qualname__r&   r   r   r   r   ÚT3   s   r*   )r   r   z0!!!)r   r   ÚnextÚiter)r   r*   r   r   r   Útest_getitemoverwriteiter1   s    z&UserListTest.test_getitemoverwriteiterc             C   s@   |   dddddg¡}| ¡ }|  ||¡ |  t|ƒt|ƒ¡ d S )Nr
   é   r   é	   )r   Úcopyr   Útype)r   r   Úvr   r   r   Útest_userlist_copy8   s    zUserListTest.test_userlist_copy)r'   r(   r)   r   r   r   r   r   r    r"   r#   r-   r3   Ú__classcell__r   r   )r   r   r      s   
r   Ú__main__)	Úcollectionsr   Útestr   ÚunittestZ
CommonTestr   r'   Úmainr   r   r   r   Ú<module>   s
   7