U
    +c
                     @   sj   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ dZG dd	 d	ej	Z
ed
krfe  dS )z$Tests for custom description module.    )absolute_import)division)print_function)custom_descriptions)	testutilsP   c                   @   sD   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S )CustomDescriptionTestc                 C   s$   d}t j|dtd}| |d d S )NTestr   objZavailable_spaceZline_length"Test"r   Z
GetSummaryLINE_LENGTHassertEqualself	componentsummary r   A/tmp/pip-unpacked-wheel-1xt1w7un/fire/custom_descriptions_test.py%test_string_type_summary_enough_space   s      z;CustomDescriptionTest.test_string_type_summary_enough_spacec                 C   s$   d}t j|dtd}| |d d S )Nr	      r
   z"..."r   r   r   r   r   3test_string_type_summary_not_enough_space_truncated#   s      zICustomDescriptionTest.test_string_type_summary_not_enough_space_truncatedc                 C   s$   d}t j|dtd}| |d d S )Nr	      r
   r   r   r   r   r   r   2test_string_type_summary_not_enough_space_new_line)   s      zHCustomDescriptionTest.test_string_type_summary_not_enough_space_new_linec                 C   s$   d}t j|dtd}| |d d S )NLorem ipsum dolor sit amet
   r
   z
"Lorem..."r   r   r   r   r   8test_string_type_summary_not_enough_space_long_truncated/   s      zNCustomDescriptionTest.test_string_type_summary_not_enough_space_long_truncatedc                 C   s$   d}t j|dtd}| |d d S )Nr	   r   r
   zThe string "Test"r   ZGetDescriptionr   r   r   r   descriptionr   r   r   )test_string_type_description_enough_space5   s      z?CustomDescriptionTest.test_string_type_description_enough_spacec                 C   s$   d}t j|dtd}| |d d S )Nr      r
   zThe string "Lore..."r   r   r   r   r   7test_string_type_description_not_enough_space_truncated;   s      zMCustomDescriptionTest.test_string_type_description_not_enough_space_truncatedc                 C   s$   d}t j|dtd}| |d d S )Nr   r   r
   z'The string "Lorem ipsum dolor sit amet"r   r   r   r   r   6test_string_type_description_not_enough_space_new_lineA   s      zLCustomDescriptionTest.test_string_type_description_not_enough_space_new_lineN)
__name__
__module____qualname__r   r   r   r   r!   r#   r$   r   r   r   r   r      s   r   __main__N)__doc__
__future__r   r   r   Zfirer   r   r   ZBaseTestCaser   r%   mainr   r   r   r   <module>   s   -