a
    ze{                     @   sl   d Z ddlmZ ddlZddlmZ ddlmZ G dd dejZ	G dd	 d	ejZ
ed
krhejdd dS )zTest pyshell, coverage 12%.    )pyshellN)requires)Tkc                   @   s   e Zd Zdd Zdd ZdS )FunctionTestc              	   C   s   | j }dD ]\}}}d}|d }| j||dP |p6d}t||}|t|| ||||  d| d|  W d    q
1 s0    Y  q
d S )N))    r   )Zfiname   =<   r	   )filebarZShellz
 RESTART:  )assertEqualsubTestr   restart_linelen)selfeqr   mulextrawidthr   line r   4/usr/lib/python3.9/idlelib/idle_test/test_pyshell.pytest_restart_line_wide   s    z#FunctionTest.test_restart_line_widec              	   C   s   d\}}|d ||d fD ]D}| j |d$ | t|d| W d    q1 sT0    Y  q| t|d d|d  d S )N)z= RESTART: Shell      )r   r      z =)r   r   r   r   )r   expectZtaglenr   r   r   r   test_restart_line_narrow   s
    4z%FunctionTest.test_restart_line_narrowN)__name__
__module____qualname__r   r   r   r   r   r   r   
   s   r   c                   @   s,   e Zd Zedd Zedd Zdd ZdS )PyShellFileListTestc                 C   s   t d t | _| j  d S )NZgui)r   r   rootZwithdrawclsr   r   r   
setUpClass"   s    zPyShellFileListTest.setUpClassc                 C   s   | j   | ` d S N)r$   Zdestroyr%   r   r   r   tearDownClass(   s    
z!PyShellFileListTest.tearDownClassc                 C   s,   t | j}| |jt j | |j  d S r(   )r   ZPyShellFileListr$   r   ZEditorWindowZPyShellEditorWindowZassertIsNone)r   Zpsflr   r   r   	test_init0   s    zPyShellFileListTest.test_initN)r    r!   r"   classmethodr'   r)   r*   r   r   r   r   r#       s
   

r#   __main__r   )	verbosity)__doc__Zidlelibr   ZunittestZtest.supportr   tkinterr   ZTestCaser   r#   r    mainr   r   r   r   <module>   s   