o
    jW
                     @   sJ   d Z ddlmZ ddlmZ dZG dd dejZedkr#e  dS dS )	zTests for formatting.py.    )
formatting)	testutilsP   c                   @   s\   e Zd Zdd Zdd Zdd Zdd Zd	d
 Zdd Zdd Z	dd Z
dd Zdd ZdS )FormattingTestc                 C      t d}| |ddg d S )Nhelloz[1mhello[0m)r   ZBoldassertInselftext r   U/var/www/html/Deteccion_Ine/venv/lib/python3.10/site-packages/fire/formatting_test.py	test_bold      
zFormattingTest.test_boldc                 C   r   )Nr   z[4mhello[0m)r   Z	Underliner   r	   r   r   r   test_underline   r   zFormattingTest.test_underlinec                 C      t jddd}| d| d S )Nr      spacesz  hellor   ZIndentassertEqualr	   r   r   r   test_indent!      zFormattingTest.test_indentc                 C   r   )Nzhello
worldr   r   z  hello
  worldr   r	   r   r   r   test_indent_multiple_lines%   r   z)FormattingTest.test_indent_multiple_linesc                 C   s   t dg}| dg| d S )Nricer   ZWrappedJoinr   r
   linesr   r   r   test_wrap_one_item)   s   z!FormattingTest.test_wrap_one_itemc                 C   s&   t jg ddd}| g d| d S )N)r   Zbeanschickencheese   )width)zrice | beans |z	chicken |r    r   r   r   r   r   test_wrap_multiple_items-   s   

z'FormattingTest.test_wrap_multiple_itemsc                 C   $   d}t j|dtd}| d| d S )NThis is a string
   r   Zavailable_spaceline_lengthz
This is...r   ZEllipsisTruncateLINE_LENGTHr   r
   r   Ztruncated_textr   r   r   test_ellipsis_truncate4   
   z%FormattingTest.test_ellipsis_truncatec                 C   $   d}t j|dtd}| d| d S )Nr%   r   r'   r)   r+   r   r   r   'test_ellipsis_truncate_not_enough_space:   r-   z6FormattingTest.test_ellipsis_truncate_not_enough_spacec                 C   r$   )N1000000000L   r'   z10...0Lr   ZEllipsisMiddleTruncater*   r   r+   r   r   r   test_ellipsis_middle_truncate@   r-   z,FormattingTest.test_ellipsis_middle_truncatec                 C   r.   )Nr0   r   r'   r2   r+   r   r   r   .test_ellipsis_middle_truncate_not_enough_spaceF   r-   z=FormattingTest.test_ellipsis_middle_truncate_not_enough_spaceN)__name__
__module____qualname__r   r   r   r   r   r#   r,   r/   r3   r4   r   r   r   r   r      s    r   __main__N)	__doc__firer   r   r*   ZBaseTestCaser   r5   mainr   r   r   r   <module>   s   6