
    ;eh                         d dl mZ d dlZd dlmZ  G d d          Z G d de          Z G d d	e          Z G d
 dej                  Z	e
dk    r ej                     dS dS )    )dequeN)NEVER_EQc                       e Zd Zd ZdS )base_setc                     || _         d S Nelselfr
   s     )/usr/lib/python3.11/test/test_contains.py__init__zbase_set.__init__   s        N)__name__
__module____qualname__r    r   r   r   r      s#            r   r   c                       e Zd Zd ZdS )mysetc                     | j         |k    S r   r	   r   s     r   __contains__zmyset.__contains__   s    w"}r   Nr   r   r   r   r   r   r   r   r   
   s#            r   r   c                       e Zd Zd ZdS )seqc                     | j         g|         S r   r	   )r   ns     r   __getitem__zseq.__getitem__   s    y|r   N)r   r   r   r   r   r   r   r   r      s#            r   r   c                   &    e Zd Zd Zd Zd Zd ZdS )TestContainsc                 r   t          d          t          d          }t          d          }|                     d|           |                     d|           |                     d|           |                     d|           |                     t          fd           |                     t          fd           |                     dd           |                     dd           |                     dd           |                     dd           |                     t          d	            d S )
N   r   c                      d v S Nr!   r   as   r   <lambda>z0TestContains.test_common_tests.<locals>.<lambda>   s    Q!V r   c                      d vS r#   r   r$   s   r   r&   z0TestContains.test_common_tests.<locals>.<lambda>   s    QaZ r   cabcd c                  
    d dv S )Nr)   r   r   r   r   r&   z0TestContains.test_common_tests.<locals>.<lambda>%   s
    TU] r   )r   r   r   assertInassertNotInassertRaises	TypeError)r   br(   r%   s      @r   test_common_testszTestContains.test_common_tests   s(   QKK!HHFFaAaA)^^^^444)%7%7%7%7888 	c5!!!e$$$b"b%   )%:%:;;;;;r   c                    t          d          }|D ]}|                     ||           |                     d|           |                     ||           t          |          }|D ]}|                     ||           |                     d|           |                     ||            G d d          }|                      |            |j                   d S )N
      c                   >    e Zd Z	  e ed                    Zd ZdS ):TestContains.test_builtin_sequence_types.<locals>.Deviant1   c                     |dk    rN| j                             d           | j                             d           | j                             d           dS )N         r   )aListremover   others     r   __eq__zATestContains.test_builtin_sequence_types.<locals>.Deviant1.__eq__<   sR    B;;J%%b)))J%%b)))J%%b)))qr   N)r   r   r   listranger=   rA   r   r   r   Deviant1r7   5   s?        
 DrOOE    r   rD   )rC   r-   r.   tupler=   )r   r%   irD   s       r   test_builtin_sequence_typesz(TestContains.test_builtin_sequence_types'   s
   "II 	  	 AMM!QQA!HH 	  	 AMM!QQA	 	 	 	 	 	 	 	 	X^44444r   c                 Z   t          d          dd dt          f}t          t          t          j        t          t          t          f}|D ]c} ||          }|D ]}| 	                    ||           | 
                    | ||          k               | 
                    ||k               dd S )Nnanr!   r)   )floatr   rB   rE   dictfromkeysset	frozensetr   r-   
assertTrue)r   valuesconstructorsconstructor	containerelems         r   test_nonreflexivezTestContains.test_nonreflexiveE   s     uq$x7UDM3	5H' 	4 	4K#F++I! / /dI....OOIV)<)<<===OOI23333	4 	4r   c                 $    G d dt                     } |            } G d d|          } |            |                     d|v            |                     dt                    v            |                     t          fd           d S )Nc                       e Zd Zd ZdS )4TestContains.test_block_fallback.<locals>.ByContainsc                     dS )NFr   r?   s     r   r   zATestContains.test_block_fallback.<locals>.ByContains.__contains__U   s    ur   Nr   r   r   r   
ByContainsrX   T   s#            r   rZ   c                       e Zd Z	 d ZdZdS )7TestContains.test_block_fallback.<locals>.BlockContainsc              3   
   K   d S r   r   )r   s    r   __iter__z@TestContains.test_block_fallback.<locals>.BlockContains.__iter__c   s       r   N)r   r   r   r^   r   r   r   r   BlockContainsr\   X   s)        	    LLLr   r_   r   c                      d v S )Nr   r   )bcs   r   r&   z2TestContains.test_block_fallback.<locals>.<lambda>j   s    Q"W r   )objectassertFalserB   r/   r0   )r   rZ   r(   r_   ra   s       @r   test_block_fallbackz TestContains.test_block_fallbackR   s    	 	 	 	 	 	 	 	 JLL	  	  	  	  	 J 	  	  	  ]__a   d2hh''')____55555r   N)r   r   r   r2   rG   rU   rd   r   r   r   r   r      sP        < < <(5 5 5<4 4 46 6 6 6 6r   r   __main__)collectionsr   unittesttest.supportr   r   r   r   TestCaser   r   mainr   r   r   <module>rk      s
          ! ! ! ! ! !           H       (   X6 X6 X6 X6 X68$ X6 X6 X6t zHMOOOOO r   