Your IP : 216.73.216.213


Current Path : /proc/242857/root/opt/alt/python34/lib64/python3.4/test/__pycache__/
Upload File :
Current File : //proc/242857/root/opt/alt/python34/lib64/python3.4/test/__pycache__/test_textwrap.cpython-34.pyc

�
g f���@sddlZddlmZmZmZmZmZmZGdd�dej�Z	Gdd�de	�Z
Gdd�de	�ZGd	d
�d
e	�ZGdd�de	�Z
Gd
d�dej�ZGdd�dej�ZGdd�de	�Zedkrej�ndS)�N)�TextWrapper�wrap�fill�dedent�indent�shortenc@sFeZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�BaseTestCasez5Parent class with utility methods for textwrap tests.cCs�t|t�rkg}x5tt|��D]!}|jd|||f�q(W|rbdj|�nd}n"t|t�r�dt|�}n|S)Nz  %d: %r�
z
  no linesz  %s
)�
isinstance�list�range�len�append�join�str�repr)�selfZtextin�result�i�r�7/opt/alt/python34/lib64/python3.4/test/test_textwrap.py�showszBaseTestCase.showcCs3|j||d|j|�|j|�f�dS)Nzexpected:
%s
but got:
%s)�assertEqualr)rr�expectrrr�checkszBaseTestCase.checkcKs&t|||�}|j||�dS)N)rr)r�text�widthr�kwargsrrrr�
check_wrap#szBaseTestCase.check_wrapcCs3|jj|�}|j||d||f�dS)Nz
expected %r
but got  %r)�wrapper�_splitr)rrrrrrr�check_split'szBaseTestCase.check_splitN)�__name__�
__module__�__qualname__�__doc__rrrr!rrrrrs
rc@s`eZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+d,�Zd-d.�Zd/d0�Zd1d2�Zd3d4�Zd5d6�Zd7d8�Zd9S):�WrapTestCasecCstdd�|_dS)Nr�-)rr)rrrr�setUp0szWrapTestCase.setUpc	Cs^d}|j|dddddddg�|j|d	d
dg�|j|d|g�dS)
Nz=Hello there, how are you this fine day?  I'm glad to hear it!�zHello there,zhow are youz	this finez	day?  I'mzglad to hearzit!�*z'Hello there, how are you this fine day?zI'm glad to hear it!�P)r)rrrrr�test_simple3s

zWrapTestCase.test_simplecCs0|jddg�|jddgdd�dS)N���drop_whitespaceF)r)rrrr�test_empty_stringDszWrapTestCase.test_empty_stringcCs<|jddgdd�|jddgdddd�dS)Nr-r.�initial_indentz++r/F)r)rrrr�%test_empty_string_with_initial_indentIsz2WrapTestCase.test_empty_string_with_initial_indentcCs�d}dddddg}tddd	�}|j|�}|j||�|j|�}|j|d
j|��d}dg}|j|d
|�d}dg}|j|d
|dd�dS)Nz�This is a paragraph that already has
line breaks.  But some of its lines are much longer than the others,
so it needs to be wrapped.
Some lines are 	tabbed too.
What a mess!
z)This is a paragraph that already has linez'breaks.  But some of its lines are muchz)longer than the others, so it needs to bez-wrapped.  Some lines are  tabbed too.  What azmess!r'�fix_sentence_endingsTr	z	Test	default		tabsize.z(        Test    default         tabsize.r+z	Test	custom		tabsize.z     Test    custom      tabsize.�tabsize�)rrrrrr)rrrrrrrr�test_whitespaceNs"				zWrapTestCase.test_whitespacecCs_tddd�}d}dg}|j|j|�|�d}dg}|j|j|�|�d}|j|j|�|�d	}d
g}|j|j|�|�d|_dd
dg}|j|j|�|�d}dddg}|j|j|�|�d|_dg}|j|j|�|�d}dg}|j|j|�|�dS)N�<r3Tz$A short line. Note the single space.z%A short line.  Note the single space.z Well, Doctor? What do you think?z!Well, Doctor?  What do you think?z Well, Doctor?
What do you think?z)I say, chaps! Anyone for "tennis?"
Hmmph!z+I say, chaps!  Anyone for "tennis?"  Hmmph!�z
I say, chaps!zAnyone for "tennis?"zHmmph!z1And she said, "Go to hell!"
Can you believe that?zAnd she said, "Go tozhell!"  Can youz
believe that?z2And she said, "Go to hell!"  Can you believe that?zFile stdio.h is nice.)rrrr)rrrrrrr�test_fix_sentence_endingsns4								z&WrapTestCase.test_fix_sentence_endingscCs9d}|j|dddg�|j|ddg�dS)NzThis is a
short paragraph.r8zThis is a shortz
paragraph.�(zThis is a short paragraph.)r)rrrrr�test_wrap_short�s
zWrapTestCase.test_wrap_shortcCs<d}|j|ddg�|j|ddgdd�dS)NzThis is a short line.�z(1) This is a short line.r1z(1) )r)rrrrr�test_wrap_short_1line�sz"WrapTestCase.test_wrap_short_1linecCsUd}|j|dddg�|j|dddg�|j|dddg�dS)	NzBthis-is-a-useful-feature-for-reformatting-posts-from-tim-peters'lyr:zthis-is-a-useful-feature-for-z%reformatting-posts-from-tim-peters'ly�)r*z*this-is-a-useful-feature-for-reformatting-zposts-from-tim-peters'ly)r)rrrrr�test_hyphenated�s

zWrapTestCase.test_hyphenatedcCs�d}|j|ddddg�|j|dddg�d	}|j|d
ddg�|j|d
ddg�|j|dd	g�dS)NzRPython 1.0.0 was released on 1994-01-26.  Python 1.0.1 was
released on 1994-02-15.r<zPython 1.0.0 was released onz1994-01-26.  Python 1.0.1 waszreleased on 1994-02-15.r:z(Python 1.0.0 was released on 1994-01-26.z(Python 1.0.1 was released on 1994-02-15.zI do all my shopping at 7-11.�zI do all my shopping atz7-11.��)r)rrrrr�test_hyphenated_numbers�s



z$WrapTestCase.test_hyphenated_numberscCs�d}|j|dddg�|j|dddg�dd	g}|j|d
|�|j|d|�|j|ddg�d
}dddg}|j|d|�|j|d|�dddg}|j|d|�|j|d|�ddg}|j|d|�|j|d|�ddg}|j|d|�|j|d|�d}ddddd dd!d"dd#d d$dd%d&d#dd'g}|j||�d(}d#dd)d d*d d+dd,dd-g}|j||�dS).Nz$Em-dashes should be written -- thus.r@zEm-dashes should bezwritten -- thus.rBzEm-dashes should be writtenz-- thus.zEm-dashes should be written --zthus.r<�#�$z%You can also do--this or even---this.zYou can also doz--this or evenz---this.��zYou can also do--zthis or even---zthis.��zYou can also do--this or even�z You can also do--this or even---� z7Here's an -- em-dash and--here's another---and another!zHere's� Zanz--zem-Zdash�andzhere'sZanotherz---zanother!zand then--bam!--he was goneZthenzbam!ZheZwasZgone)rr!)rrrrrr�test_em_dash�sR

	
				zWrapTestCase.test_em_dashcCs4d}|j|dddddg�|j|ddd	d
g�ddg}|j|d
|�|j|d|�|j|d|�|j|d|�ddg}|j|d|�|j|d|�dd
g}|j|d|�d}ddddddddddddddg}|j||�dS) Nz<You should use the -n option, or --dry-run in its long form.r8zYou should use thez-n option, or --dry-zrun in its longzform.�zYou should use the -nzoption, or --dry-runzin its long form.z You should use the -n option, orz--dry-run in its long form.rK�"rD�&z'You should use the -n option, or --dry-zrun in its long form.�'r>z*You should use the -n option, or --dry-runr*z'the -n option, or --dry-run or --dryrun�therLz-nzoption,�orz--dry-Zrunz--dryrun)rr!)rrrrrr�test_unix_optionss6

			zWrapTestCase.test_unix_optionscCs�|jddddddg�|jddddg�|jd	ddd
g�|jddg�|jddg�|jd
ddg�|jdddddddg�dS)Nzwhat the--hey!ZwhatrLrSz--zhey!z
what the--zthe--zwhat the--.zthe--.z	--text--.z--optionz--option-optz	--option-Zoptzfoo --option-opt bar�foo�bar)r!)rrrr�test_funky_hyphens's	zWrapTestCase.test_funky_hyphenscCs�|jdddddddg�|jddddd	ddg�|jd
ddddddg�|jd
ddddddg�dS)Nzthe 'wibble-wobble' widgetrSrLz'wibble-zwobble'Zwidgetzthe "wibble-wobble" widgetz"wibble-zwobble"zthe (wibble-wobble) widgetz(wibble-zwobble)zthe ['wibble-wobble'] widgetz	['wibble-zwobble'])r!)rrrr�test_punct_hyphens8s				zWrapTestCase.test_punct_hyphensc	Csg|jddddddg�|jddddddg�|jd	d
dddddd
g�dS)Nzfoo (--option) barrVrLz
(--option)rWz
foo (bar) bazz(bar)Zbazzblah (ding dong), wubbaZblahz(dingzdong),Zwubba)r!)rrrr�test_funky_parensIs			zWrapTestCase.test_funky_parensc	Cs5d}|j|dddddddgd	d
�dS)Nz0 This is a    sentence with     much whitespace.�
z
 This is az    z	sentence z	with     z
much whitezspace.r/F)r)rrrrr�test_drop_whitespace_falseVs
	z'WrapTestCase.test_drop_whitespace_falsecCs |jdddgdd�dS)Nz   r.r/F)r)rrrr�*test_drop_whitespace_false_whitespace_only_sz7WrapTestCase.test_drop_whitespace_false_whitespace_onlycCs&|jdddgdddd�dS)Nz   r.z     r/Fr1z  )r)rrrr�6test_drop_whitespace_false_whitespace_only_with_indentcszCWrapTestCase.test_drop_whitespace_false_whitespace_only_with_indentcCs|jddg�dS)Nz  r.)r)rrrr�$test_drop_whitespace_whitespace_onlyisz1WrapTestCase.test_drop_whitespace_whitespace_onlycCs9d}|j|ddg�|j|dddg�dS)Nz, This is a sentence with leading whitespace.�2r<z This is a sentence withzleading whitespace.)r)rrrrr�'test_drop_whitespace_leading_whitespacems

z4WrapTestCase.test_drop_whitespace_leading_whitespacecCsEd}|j|ddddgdd�|j|dddg�dS)Nzabcd    efghr.Zabcdz    Zefghr/F)r)rrrrr�$test_drop_whitespace_whitespace_linexsz1WrapTestCase.test_drop_whitespace_whitespace_linecCs|jddgdd�dS)Nz  r.r1z++)r)rrrr�0test_drop_whitespace_whitespace_only_with_indent�sz=WrapTestCase.test_drop_whitespace_whitespace_only_with_indentcCs)|jddddgdddd�dS)Nz	abcd efghr.z  abcdz  efghr1z  �subsequent_indent)r)rrrr�&test_drop_whitespace_whitespace_indent�sz3WrapTestCase.test_drop_whitespace_whitespace_indentcCsbd}|jj|�}|j|dddddddddddd	dd
ddddg�dS)
Nz0Hello there -- you goof-ball, use the -b option!�HellorLZtherez--Zyouzgoof-zball,ZuserSz-bzoption!)rr r)rrrrrr�
test_split�s
	zWrapTestCase.test_splitcCsHd}|j|dddgdd�|j|dddgdd	�dS)
Nz
yaba daba-door[z
yaba daba-ZdooZbreak_on_hyphensTZyabazdaba-dooF)r)rrrrr�test_break_on_hyphens�s
z"WrapTestCase.test_break_on_hyphenscCs6d}|jtt|d�|jtt|d�dS)NzWhatever, it doesn't matter.r����)�assertRaises�
ValueErrorr)rrrrr�test_bad_width�szWrapTestCase.test_bad_widthcCs&d}|j|ddddg�dS)NuDie Empfänger-Auswahl�
ZDieuEmpfänger-ZAuswahl)r)rrrrr�test_no_split_at_umlaut�sz$WrapTestCase.test_no_split_at_umlautcCs#d}|j|dddg�dS)Nuaa ää-ää�uaa ää-uää)r)rrrrr�test_umlaut_followed_by_dash�sz)WrapTestCase.test_umlaut_followed_by_dashN)r"r#r$r(r,r0r2r6r9r;r=r?rCrNrUrXrYrZr\r]r^r_rarbrcrergrhrmrorqrrrrr&.s8 *

7"
		r&c@s:eZdZdZdd�Zdd�Zdd�ZdS)	�MaxLinesTestCasez=Hello there, how are you this fine day?  I'm glad to hear it!c	Cs�|j|jddgdd�|j|jddgdd�|j|jdddgdd�|j|jd	dd
gdd�|j|jd|jgdd�|j|jdddd
dddgdd�dS)Nr)zHello [...]�	max_linesrrizHello there,z	how [...]�rnz
how are [...]r+zhow are youz	this finez	day?  I'mzglad to hearzit!r.)rr)rrrrr,�s.				"	zMaxLinesTestCase.test_simplec	Cs�|j|jdddddgdd�|j|jdd	d
gdd�|j|jddddddddgdd�dS)Nr)zHello there,zhow are youz	this finez
day? [...]rsr5r.rfz[...]rtrLr[z	day?  I'mzglad to hearzit!z
          )rr)rrrr�test_spaces�s$			zMaxLinesTestCase.test_spacescCsL|j|jddgdddd�|j|jdddgdd	dd�|jt��'t|jd
dddddd
�WdQX|jt��'t|jd
dddd	dd
�WdQX|j|jd
ddgdd	dddddd
�|j|jd
dgdddddddd
�|j|jd|jgddd�dS)Nr)zHello...rsri�placeholderz...zHello there,z
how are...rtrGr1z    z [truncated]...rdz    Hello there,z  [truncated]...z  r+�.i�)rrrkrlr)rrrr�test_placeholder�s:				z!MaxLinesTestCase.test_placeholderN)r"r#r$rr,rurxrrrrrr�srrc@s@eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�LongWordTestCasecCst�|_d|_dS)Nz]Did you say "supercalifragilisticexpialidocious?"
How *do* you spell that odd word, anyways?
)rrr)rrrrr(szLongWordTestCase.setUpcCs�|j|jdddddg�|j|jdddg�|jdd
dd
ddddgdd�|j|jddddddddddg	�dS) Nr<zDid you say "supercalifragiliszticexpialidocious?" How *do*zyou spell that odd word,zanyways?r`z1Did you say "supercalifragilisticexpialidocious?"z*How *do* you spell that odd word, anyways?�-r[Zhelloz
----------z               hz               ez               lz               ordrLrFr)zDid you say z"supercalifr�agilisticexpzialidocious?z
" How *do*z	you spellzthat oddzword,z
----------z----------helloz               )rr)rrrr�test_break_longs4

	z LongWordTestCase.test_break_longcCs~d|j_d|j_ddddg}|jj|j�}|j||�t|jdddd�}|j||�dS)	Nrr<zDid you sayz%"supercalifragilisticexpialidocious?"zHow *do* you spell that oddzword, anyways?r�break_long_words)rr}rrrr)rrrrrr�test_nobreak_long0s	z"LongWordTestCase.test_nobreak_longcCs,|j|jdddddgdd�dS)Nr)zDid you say z"supercalifrr{z[...]rsr5)rr)rrrr�test_max_lines_long@s	z$LongWordTestCase.test_max_lines_longN)r"r#r$r(r|r~rrrrrrys$ryc@s@eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�IndentTestCasescCs
d|_dS)NznThis paragraph will be filled, first without any indentation,
and then with some (including a hanging indent).)r)rrrrr(LszIndentTestCases.setUpcCs,d}t|jd�}|j||�dS)NznThis paragraph will be filled, first
without any indentation, and then with
some (including a hanging indent).r:)rrr)rrrrrr�	test_fillRszIndentTestCases.test_fillcCsrdddg}t|jddd�}|j||�dj|�}t|jddd�}|j||�dS)Nz#     This paragraph will be filled,z'first without any indentation, and thenz'with some (including a hanging indent).r:r1z     r	)rrrrr)rrrrrr�test_initial_indent^s	z#IndentTestCases.test_initial_indentcCs8d}t|jddddd�}|j||�dS)Nz~  * This paragraph will be filled, first
    without any indentation, and then
    with some (including a hanging
    indent).r:r1z  * rdz    )rrr)rrrrrr�test_subsequent_indentlsz&IndentTestCases.test_subsequent_indentN)r"r#r$r(r�r�r�rrrrr�Isr�c@sXeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
S)�DedentTestCasecCs|j|t|��dS)z,assert that dedent() has no effect on 'text'N)rr)rrrrr�assertUnchanged~szDedentTestCase.assertUnchangedcCsPd}|j|�d}|j|�d}|j|�d}|j|�dS)Nz,Hello there.
How are you?
Oh good, I'm glad.zHello there.

Boo!z Hello there.
  This is indented.zHello there.

  Boo!
)r�)rrrrr�test_dedent_nomargin�s


z#DedentTestCase.test_dedent_nomargincCsjd}d}|j|t|��d}d}|j|t|��d}d}|j|t|��dS)Nz'  Hello there.
  How are ya?
  Oh good.z!Hello there.
How are ya?
Oh good.z)  Hello there.

  How are ya?
  Oh good.
z#Hello there.

How are ya?
Oh good.
z+  Hello there.
  
  How are ya?
  Oh good.
)rr)rrrrrr�test_dedent_even�szDedentTestCase.test_dedent_evencCsjd}d}|j|t|��d}d}|j|t|��d}d}|j|t|��dS)NzK        def foo():
            while 1:
                return foo
        z+def foo():
    while 1:
        return foo
z  Foo
    Bar

   Baz
zFoo
  Bar

 Baz
z  Foo
    Bar
 
   Baz
)rr)rrrrrr�test_dedent_uneven�sz!DedentTestCase.test_dedent_unevencCs<d}d}|j|t|��|j|t|��dS)Nz  hello	there
  how are	you?zhello	there
how are	you?)rr)rrrrrr�"test_dedent_preserve_internal_tabs�sz1DedentTestCase.test_dedent_preserve_internal_tabscCs�d}|j|�d}|j|�d}d}|j|t|��d}|j|t|��d}|j|t|��d}d}|j|t|��d	}d
}|j|t|��dS)Nz  hello there
	how are you?z!        hello there
	how are you?z	hello there
	how are you?zhello there
how are you?z  	hello there
  	how are you?z"  	  hello there
  	  how are you?z   	hello there
  	  how are you?zhello there
  how are you?z2  	hello there
   	how are you?
 	I'm fine, thanksz/ 	hello there
  	how are you?
	I'm fine, thanks)r�rr)rrrrrr� test_dedent_preserve_margin_tabs�s"

z/DedentTestCase.test_dedent_preserve_margin_tabsN)	r"r#r$r�r�r�r�r�r�rrrrr�|sr�c@s�eZdZdZedZdd�Zdd	�Zd
d�Zdd
�Zdd�Z	dd�Z
dd�Zdd�Zdd�Z
dd�Zdd�ZdS)�IndentTestCase�Hi.
This is a test.
Testing.�Hi.
This is a test.

Testing.�
Hi.
This is a test.
Testing.
� Hi.
This is a test.
Testing.
�#
Hi.
This is a test.

Testing.

cCs1x*|jD]}|jt|d�|�q
WdS)Nr-)�CASESrr)rrrrr�test_indent_nomargin_default�sz+IndentTestCase.test_indent_nomargin_defaultcCs4x-|jD]"}|jt|dd�|�q
WdS)Nr-)r�rr)rrrrr�%test_indent_nomargin_explicit_default�sz4IndentTestCase.test_indent_nomargin_explicit_defaultcCs@dd�}x-|jD]"}|jt|d|�|�qWdS)NcSsdS)NTr)�linerrr�<lambda>sz?IndentTestCase.test_indent_nomargin_all_lines.<locals>.<lambda>r-)r�rr)r�	predicaterrrr�test_indent_nomargin_all_linessz-IndentTestCase.test_indent_nomargin_all_linescCs@dd�}x-|jD]"}|jt|d|�|�qWdS)NcSsdS)NFr)r�rrrr�sz5IndentTestCase.test_indent_no_lines.<locals>.<lambda>z    )r�rr)rr�rrrr�test_indent_no_linessz#IndentTestCase.test_indent_no_linescCs7x0|jD]%}|jtt|d��|�q
WdS)Nz    )�ROUNDTRIP_CASESrrr)rrrrr�test_roundtrip_spacessz$IndentTestCase.test_roundtrip_spacescCs7x0|jD]%}|jtt|d��|�q
WdS)Nz		)r�rrr)rrrrr�test_roundtrip_tabssz"IndentTestCase.test_roundtrip_tabscCs7x0|jD]%}|jtt|d��|�q
WdS)Nz 	  	 )r�rrr)rrrrr�test_roundtrip_mixedsz#IndentTestCase.test_roundtrip_mixedcCsLd}d}x9t|j|�D]%\}}|jt||�|�qWdS)Nz  �"  Hi.
  This is a test.
  Testing.�#  Hi.
  This is a test.

  Testing.�$
  Hi.
  This is a test.
  Testing.
�&  Hi.
  This is a test.
  Testing.
�)
  Hi.
  This is a test.

  Testing.

)r�r�r�r�r�)�zipr�rr)r�prefix�expectedrrrrr�test_indent_default!sz"IndentTestCase.test_indent_defaultcCsOd}d}x<t|j|�D](\}}|jt||d�|�qWdS)Nz  �"  Hi.
  This is a test.
  Testing.�#  Hi.
  This is a test.

  Testing.�$
  Hi.
  This is a test.
  Testing.
�&  Hi.
  This is a test.
  Testing.
�)
  Hi.
  This is a test.

  Testing.

)r�r�r�r�r�)r�r�rr)rr�r�rrrrr�test_indent_explicit_default3sz+IndentTestCase.test_indent_explicit_defaultcCs[d}d	}dd�}x<t|j|�D](\}}|jt|||�|�q+WdS)
Nz  �"  Hi.
  This is a test.
  Testing.�%  Hi.
  This is a test.
  
  Testing.�&  
  Hi.
  This is a test.
  Testing.
�&  Hi.
  This is a test.
  Testing.
�/  
  Hi.
  This is a test.
  
  Testing.
  
cSsdS)NTr)r�rrrr�Tsz6IndentTestCase.test_indent_all_lines.<locals>.<lambda>)r�r�r�r�r�)r�r�rr)rr�r�r�rrrrr�test_indent_all_linesEsz$IndentTestCase.test_indent_all_linescCs[d}d	}dd�}x<t|j|�D](\}}|jt|||�|�q+WdS)
Nz  �Hi.
This is a test.
Testing.�Hi.
This is a test.
  
Testing.�   
Hi.
This is a test.
Testing.
� Hi.
This is a test.
Testing.
�)  
Hi.
This is a test.
  
Testing.
  
cSs|j�S)N)�strip)r�rrrr�gsz8IndentTestCase.test_indent_empty_lines.<locals>.<lambda>)r�r�r�r�r�)r�r�rr)rr�r�r�rrrrr�test_indent_empty_linesXsz&IndentTestCase.test_indent_empty_linesN)r�r�r�)r�r�)r"r#r$r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr��s"r�c@sdeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�ShortenTestCasecKs&t|||�}|j||�dS)N)rr)rrrrrrrrr�
check_shortennszShortenTestCase.check_shortencCsSd}|j|dd�|j|t|�|�|j|t|�dd�dS)Nz<Hello there, how are you this fine day? I'm glad to hear it!�zHello there, [...]riz9Hello there, how are you this fine day? I'm glad to [...])r�r
)rrrrrr,rs
zShortenTestCase.test_simplecCs�d}|j|dddd�|j|dddd�|j|dddd	�|j|t|�|dd�|j|t|�d
ddd�dS)Nz<Hello there, how are you this fine day? I'm glad to hear it!rHzHello there,$$rvz$$r�zHello there, how$$zHello there, $$z $$riz:Hello there, how are you this fine day? I'm glad to hear$$)r�r
)rrrrrrx|sz ShortenTestCase.test_placeholdercCs|jddd�dS)Nr-r.)r�)rrrrr0�sz!ShortenTestCase.test_empty_stringcCsid}|j|dd�|j|dd�|jddd�|jdd	d
�|jddd�dS)
Nz[
            This is a  paragraph that  already has
            line breaks and 	 tabs too.�>z>This is a paragraph that already has line breaks and tabs too.�=z:This is a paragraph that already has line breaks and [...]zhello      world!  r)zhello world!�zhello [...]r[z[...])r�)rrrrrr6�szShortenTestCase.test_whitespacec
CsFtddddd�|jt��td	dddd�WdQXdS)
N�xr8r�rvz(......)z	(.......)�xxxxxxxxxxxxxxxxxxxxr�)rrkrl)rrrr�$test_width_too_small_for_placeholder�sz4ShortenTestCase.test_width_too_small_for_placeholdercCs|jddd�dS)NZHelloo�z[...])r�)rrrr�-test_first_word_too_long_but_placeholder_fits�sz=ShortenTestCase.test_first_word_too_long_but_placeholder_fitsN)
r"r#r$r�r,rxr0r6r�r�rrrrr�ls
r��__main__)Zunittest�textwraprrrrrrZTestCaserr&rrryr�r�r�r�r"�mainrrrr�<module>s.��TE3j�9