a
    ze%                     @   sB   d Z ddlmZ ddlZG dd dejZedkr>ejdd dS )	zTest rpc, coverage 20%.    )rpcNc                   @   s$   e Zd Zdd Zdd Zdd ZdS )CodePicklerTestc                 C   sP   dd }t |j\}\}| |t j | d| t |}| |jd d S )Nc                   S   s   t t t S Nabc r	   r	   0/usr/lib/python3.9/idlelib/idle_test/test_rpc.pyf       z/CodePicklerTest.test_pickle_unpickle.<locals>.f   test_rpc.pyr   )r   Zpickle_code__code__ZassertIsZunpickle_codeassertInZassertEqualco_names)selfr   funcZcbytescoder	   r	   r
   test_pickle_unpickle
   s    
z$CodePicklerTest.test_pickle_unpicklec                 C   s   |  tdd jtjj d S )Nc                   S   s   d S r   r	   r	   r	   r	   r
   <lambda>   r   z3CodePicklerTest.test_code_pickler.<locals>.<lambda>)r   typer   r   ZCodePicklerdispatch_table)r   r	   r	   r
   test_code_pickler   s    z!CodePicklerTest.test_code_picklerc                 C   s    dd }|  dt|j d S )Nc                   S   s   d S r   r	   r	   r	   r	   r
   r      r   z%CodePicklerTest.test_dumps.<locals>.fr   )r   r   dumpsr   )r   r   r	   r	   r
   
test_dumps   s    zCodePicklerTest.test_dumpsN)__name__
__module____qualname__r   r   r   r	   r	   r	   r
   r      s   r   __main__   )	verbosity)__doc__Zidlelibr   ZunittestZTestCaser   r   mainr	   r	   r	   r
   <module>   s
   