Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/test/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/test/__pycache__/test_textwrap.cpython-38.opt-2.pyc
U

>��gZ��@s�ddlZddlmZmZmZmZmZmZGdd�dej�Z	Gdd�de	�Z
Gdd�de	�ZGd	d
�d
e	�ZGdd�de	�Z
Gd
d�dej�ZGdd�dej�ZGdd�de	�Zedkr�e��dS)�N)�TextWrapper�wrap�fill�dedent�indent�shortenc@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�BaseTestCasecCsdt|t�rJg}tt|��D]}|�d|||f�q|rDd�|�nd}nt|t�r`dt|�}|S)Nz  %d: %r�
z
  no linesz  %s
)�
isinstance�list�range�len�append�join�str�repr)�selfZtextin�result�i�r�1/opt/cppython/lib/python3.8/test/test_textwrap.py�shows

zBaseTestCase.showc	Cs&|�||d|�|�|�|�f�dS)Nzexpected:
%s
but got:
%s)�assertEqualr)rr�expectrrr�checks��zBaseTestCase.checkcKst||f|�}|�||�dS�N)rr�r�text�widthr�kwargsrrrr�
check_wrap#szBaseTestCase.check_wrapcCs&|j�|�}|�||d||f�dS)Nz
expected %r
but got  %r)�wrapper�_splitr)rrrrrrr�check_split's��zBaseTestCase.check_splitN)�__name__�
__module__�__qualname__rrr r#rrrrrsrc@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�Zd9d:�Zd;d<�Z d=S)>�WrapTestCasecCstdd�|_dS)N�-)r)rr!�rrrr�setUp0szWrapTestCase.setUpc
CsDd}|�|dddddddg�|�|d	d
dg�|�|d|g�dS)
N�=Hello there, how are you this fine day?  I'm glad to hear it!��Hello there,�how are you�	this fine�	day?  I'm�glad to hear�it!�*z'Hello there, how are you this fine day?zI'm glad to hear it!�P�r �rrrrr�test_simple3s ����zWrapTestCase.test_simplecCs$|�ddg�|jddgdd�dS)N��F��drop_whitespacer5r)rrr�test_empty_stringDszWrapTestCase.test_empty_stringcCs*|jddgdd�|jddgddd�dS)Nr8r9�++��initial_indentF)r?r;r5r)rrr�%test_empty_string_with_initial_indentIsz2WrapTestCase.test_empty_string_with_initial_indentcCs�d}dddddg}tddd	�}|�|�}|�||�|�|�}|�|d
�|��d}dg}|�|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(T�Zfix_sentence_endingsr	z	Test	default		tabsize.z(        Test    default         tabsize.r4z	Test	custom		tabsize.z     Test    custom      tabsize.�)�tabsize)rrrrrr )rrrr!rrrr�test_whitespaceNs$�

zWrapTestCase.test_whitespacecCs�tddd�}d}dg}|�|�|�|�d}dg}|�|�|�|�d}|�|�|�|�d	}d
g}|�|�|�|�d|_dd
dg}|�|�|�|�d}dddg}|�|�|�|�d|_dg}|�|�|�|�d}dg}|�|�|�|�dS)N�<TrAz$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)rr!rrrrr�test_fix_sentence_endingsns6
�z&WrapTestCase.test_fix_sentence_endingscCs*d}|�|dddg�|�|ddg�dS)NzThis is a
short paragraph.rFzThis is a shortz
paragraph.�(zThis is a short paragraph.r5r6rrr�test_wrap_short�s

�zWrapTestCase.test_wrap_shortcCs,d}|�|ddg�|j|ddgdd�dS)NzThis is a short line.�z(1) This is a short line.z(1) r>r5r6rrr�test_wrap_short_1line�s
�z"WrapTestCase.test_wrap_short_1linecCs�d}|�|dddg�|�|dddg�|�|dddg�d	�d
�}|j|d|dd
�|�||�|�ddg�|�ddg�|�dd�d
��dS)NzBthis-is-a-useful-feature-for-reformatting-posts-from-tim-peters'lyrHzthis-is-a-useful-feature-for-z%reformatting-posts-from-tim-peters'ly�)r3z*this-is-a-useful-feature-for-reformatting-zposts-from-tim-peters'lyzLthis-|is-|a-|useful-|feature-|for-|reformatting-|posts-|from-|tim-|peters'ly�|�F��break_long_wordsze-mailzJelly-Ozhalf-a-crownzhalf-|a-|crown)r �splitr#�rrrrrr�test_hyphenated�s0�������zWrapTestCase.test_hyphenatedcCs�d}|�|ddddg�|�|dddg�|j|d	|��d
d�d}|�|d
ddg�|�|dddg�|�|ddg�|j|d	|��d
d�dS)NzRPython 1.0.0 was released on 1994-01-26.  Python 1.0.1 was
released on 1994-02-15.rJzPython 1.0.0 was released onz1994-01-26.  Python 1.0.1 waszreleased on 1994-02-15.rHz(Python 1.0.0 was released on 1994-01-26.z(Python 1.0.1 was released on 1994-02-15.rNFrOzI do all my shopping at 7-11.�zI do all my shopping atz7-11.��)r rQr6rrr�test_hyphenated_numbers�s$
�
�
�
�z$WrapTestCase.test_hyphenated_numberscCsZd}|�|dddg�|�|dddg�dd	g}|�|d
|�|�|d|�|�|ddg�d
}dddg}|�|d|�|�|d|�dddg}|�|d|�|�|d|�ddg}|�|d|�|�|d|�ddg}|�|d|�|�|d|�d}ddddd dd!d"dd#d d$dd%d&d#dd'g}|�||�d(}d#dd)d d*d d+dd,dd-g}|�||�dS).Nz$Em-dashes should be written -- thus.rTzEm-dashes should bezwritten -- thus.rVzEm-dashes should be writtenz-- thus.zEm-dashes should be written --zthus.rJ�#�$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� Zan�--zem-Zdash�andzhere'sZanotherz---zanother!zand then--bam!--he was goneZthenzbam!�heZwasZgone�r r#rRrrr�test_em_dash�s�������������zWrapTestCase.test_em_dashcCs�d}|�|dddddg�|�|ddd	d
g�ddg}|�|d
|�|�|d|�|�|d|�|�|d|�ddg}|�|d|�|�|d|�dd
g}|�|d|�d}ddddddddddddddg}|�||�dS) Nz<You should use the -n option, or --dry-run in its long form.rFzYou 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.r_�"rX�&z'You should use the -n option, or --dry-zrun in its long form.�'rLz*You should use the -n option, or --dry-runr3z'the -n option, or --dry-run or --dryrun�ther`z-nzoption,�orz--dry-�runz--dryrunrdrRrrr�test_unix_optionssP��������zWrapTestCase.test_unix_optionsc	Cs�|�ddddddg�|�ddddg�|�d	ddd
g�|�ddg�|�ddg�|�d
ddg�|�dddddddg�dS)Nzwhat the--hey!Zwhatr`rjrazhey!z
what the--zthe--zwhat the--.zthe--.z	--text--.z--optionz--option-optz	--option-�optzfoo --option-opt bar�foo�bar�r#r)rrr�test_funky_hyphens3s�zWrapTestCase.test_funky_hyphensc	Csv|�dddddddg�|�ddddd	ddg�|�d
ddddddg�|�d
ddddddg�|�dd�d��dS)Nzthe 'wibble-wobble' widgetrjr`z'wibble-zwobble'Zwidgetzthe "wibble-wobble" widgetz"wibble-zwobble"zthe (wibble-wobble) widgetz(wibble-zwobble)zthe ['wibble-wobble'] widgetz	['wibble-zwobble']zwhat-d'you-call-it.zwhat-d'you-|call-|it.rM)r#rQr)rrr�test_punct_hyphensDs�����zWrapTestCase.test_punct_hyphensc
CsJ|�ddddddg�|�ddddddg�|�d	d
dddddd
g�dS)Nzfoo (--option) barror`z
(--option)rpz
foo (bar) bazz(bar)Zbazzblah (ding dong), wubbaZblahz(dingzdong),Zwubbarqr)rrr�test_funky_parensYs��
��zWrapTestCase.test_funky_parensc	Cs&d}|j|dddddddgd	d
�dS)Nz0 This is a    sentence with     much whitespace.�
z
 This is a�    z	sentence z	with     z
much whitezspace.Fr:r5r6rrr�test_drop_whitespace_falsefs��z'WrapTestCase.test_drop_whitespace_falsecCs|jdddgdd�dS)N�   r9Fr:r5r)rrr�*test_drop_whitespace_false_whitespace_onlyosz7WrapTestCase.test_drop_whitespace_false_whitespace_onlycCs|jdddgddd�dS)Nrxr9�     F�  )r;r?r5r)rrr�6test_drop_whitespace_false_whitespace_only_with_indentss�zCWrapTestCase.test_drop_whitespace_false_whitespace_only_with_indentcCs|�ddg�dS)Nr{r9r5r)rrr�$test_drop_whitespace_whitespace_onlyysz1WrapTestCase.test_drop_whitespace_whitespace_onlycCs*d}|�|ddg�|�|dddg�dS)Nz, This is a sentence with leading whitespace.�2rJz This is a sentence withzleading whitespace.r5r6rrr�'test_drop_whitespace_leading_whitespace}s��z4WrapTestCase.test_drop_whitespace_leading_whitespacecCs2d}|j|ddddgdd�|�|dddg�dS)Nzabcd    efghr9ZabcdrvZefghFr:r5r6rrr�$test_drop_whitespace_whitespace_line�s
�z1WrapTestCase.test_drop_whitespace_whitespace_linecCs|jddgdd�dS)Nr{r9r=r>r5r)rrr�0test_drop_whitespace_whitespace_only_with_indent�sz=WrapTestCase.test_drop_whitespace_whitespace_only_with_indentcCs|jddddgddd�dS)Nz	abcd efghr9z  abcdz  efghr{�r?�subsequent_indentr5r)rrr�&test_drop_whitespace_whitespace_indent�s�z3WrapTestCase.test_drop_whitespace_whitespace_indentcCsDd}|j�|�}|�|dddddddddddd	dd
ddddg�dS)
Nz0Hello there -- you goof-ball, use the -b option!�Hellor`ZthereraZyouzgoof-zball,Zuserjz-bzoption!)r!r"r)rrrrrr�
test_split�s��zWrapTestCase.test_splitcCs4d}|j|dddgdd�|j|dddgd	d�dS)
Nz
yaba daba-dooruz
yaba daba-ZdooT�Zbreak_on_hyphensZyabazdaba-dooFr5r6rrr�test_break_on_hyphens�s��z"WrapTestCase.test_break_on_hyphenscCs(d}|�tt|d�|�tt|d�dS)NzWhatever, it doesn't matter.r���)�assertRaises�
ValueErrorrr6rrr�test_bad_width�szWrapTestCase.test_bad_widthcCsd}|�|ddddg�dS)NuDie Empfänger-Auswahl�
ZDieuEmpfänger-ZAuswahlr5r6rrr�test_no_split_at_umlaut�sz$WrapTestCase.test_no_split_at_umlautcCsd}|�|dddg�dS)Nuaa ää-ää�uaa ää-uäär5r6rrr�test_umlaut_followed_by_dash�sz)WrapTestCase.test_umlaut_followed_by_dashcCs8d}|j|ddddgdd�|j|dddd	gd
d�dS)Nu,This is a sentence with non-breaking space.rF�This is a sentence�	with non-ubreaking space.Tr��withunon-breaking space.Fr5r6rrr�test_non_breaking_space�s����z$WrapTestCase.test_non_breaking_spacecCs8d}|j|ddddgdd�|j|dddd	gd
d�dS)Nu-This is a sentence with non-breaking space.rFr�r�ubreaking space.Tr�r�unon-breaking space.Fr5r6rrr�test_narrow_non_breaking_space�s����z+WrapTestCase.test_narrow_non_breaking_spaceN)!r$r%r&r*r7r<r@rDrGrIrKrSrWrermrrrsrtrwryr|r}rr�r�r�r�r�r�r�r�r�r�rrrrr'.s< *

7"
		r'c@s0eZdZdZdd�Zdd�Zdd�Zdd	�Zd
S)�MaxLinesTestCaser+c	Cs�|j|jddgdd�|j|jddgdd�|j|jdddgdd�|j|jd	dd
gdd�|j|jd|jgdd�|j|jdddd
dddgdd�dS)Nr,zHello [...]r��	max_linesrNr-z	how [...]�r�z
how are [...]r4r.r/r0r1r2r9�r rr)rrrr7�s>
�
�
��
��
��zMaxLinesTestCase.test_simplec	Cs\|j|jdddddgdd�|j|jdd	d
gdd�|j|jdddddd
ddgdd�dS)Nr,r-r.r/z
day? [...]rBr�r9r��[...]r�z
          r0r1r2r�r)rrr�test_spaces�s0
��
����zMaxLinesTestCase.test_spacesc	Cs�|j|jddgddd�|j|jdddgddd�|�t��t|jd	d
ddd�W5QRX|�t��t|jd	d
ddd
�W5QRX|j|jd	ddgdd
ddd�|j|jd	dgddd
dd�|j|jd|jgdd�dS)Nr,zHello...rNz...�r��placeholderr-z
how are...r�r[rvz [truncated]...)r?r�r�)r�r�r�z    Hello there,z  [truncated]...r{)r�r?r�r�r4a�........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................�r�)r rr�r�rr)rrr�test_placeholdersN
�
��
�
�
��
�z!MaxLinesTestCase.test_placeholdercCs d}|j|dddgddd�dS)Nz1Good grief Python features are advancing quickly!r,z
Good griefzPython*****�z*****r�r5r6rrr�test_placeholder_backtrack2s�z+MaxLinesTestCase.test_placeholder_backtrackN)r$r%r&rr7r�r�r�rrrrr��s
 r�c@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�LongWordTestCasecCst�|_d|_dS)Nz]Did you say "supercalifragilisticexpialidocious?"
How *do* you spell that odd word, anyways?
)rr!rr)rrrr*?szLongWordTestCase.setUpc
Csp|�|jdddddg�|�|jdddg�|jd	d
ddd
dddgdd�|�|jddddddddddg	�dS)NrJzDid 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?z----------helloruz
----------z               hz               ez               lz               oz               )r�r,�Did you say �"supercalifr�agilisticexpzialidocious?z
" How *do*z	you spellzthat oddzword,r�r)rrr�test_break_longFsD
��
����
��z LongWordTestCase.test_break_longcCsVd|j_d|j_ddddg}|j�|j�}|�||�t|jddd�}|�||�dS)NrrJzDid you sayz%"supercalifragilisticexpialidocious?"zHow *do* you spell that oddzword, anyways?)rrP)r!rPrrrr�rrrrrr�test_nobreak_longjs�z"LongWordTestCase.test_nobreak_longcCs |j|jdddddgdd�dS)Nr,r�r�r�r�rBr�r�r)rrr�test_max_lines_longzs
��z$LongWordTestCase.test_max_lines_longN)r$r%r&r*r�r�r�rrrrr�>s$r�c@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).)rr)rrrr*�szIndentTestCases.setUpcCs d}t|jd�}|�||�dS)NznThis paragraph will be filled, first
without any indentation, and then with
some (including a hanging indent).rH�rrrr�rrr�	test_fill�szIndentTestCases.test_fillcCsPdddg}t|jddd�}|�||�d�|�}t|jddd�}|�||�dS)Nz#     This paragraph will be filled,z'first without any indentation, and thenz'with some (including a hanging indent).rHrzr>r	)rrrrrr�rrr�test_initial_indent�s�
z#IndentTestCases.test_initial_indentcCs&d}t|jdddd�}|�||�dS)Nz~  * This paragraph will be filled, first
    without any indentation, and then
    with some (including a hanging
    indent).rHz  * rvr�r�r�rrr�test_subsequent_indent�s�z&IndentTestCases.test_subsequent_indentN)r$r%r&r*r�r�r�rrrrr��sr�c@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�DedentTestCasecCs|�|t|��dSr�rrr6rrr�assertUnchanged�szDedentTestCase.assertUnchangedcCs<d}|�|�d}|�|�d}|�|�d}|�|�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�r6rrr�test_dedent_nomargin�s


z#DedentTestCase.test_dedent_nomargincCsLd}d}|�|t|��d}d}|�|t|��d}d}|�|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.
r�rRrrr�test_dedent_even�szDedentTestCase.test_dedent_evencCsLd}d}|�|t|��d}d}|�|t|��d}d}|�|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
r�rRrrr�test_dedent_uneven�sz!DedentTestCase.test_dedent_unevencCsLd}d}|�|t|��d}d}|�|t|��d}d}|�|t|��dS)Nz     Foo
    Bar
z	 Foo
Bar
z     Foo

    Bar
z
 Foo

Bar
z     Foo
    
    Bar
r�rRrrr�test_dedent_declining�sz$DedentTestCase.test_dedent_decliningcCs,d}d}|�|t|��|�|t|��dS)Nz  hello	there
  how are	you?zhello	there
how are	you?r�rRrrr�"test_dedent_preserve_internal_tabssz1DedentTestCase.test_dedent_preserve_internal_tabscCs�d}|�|�d}|�|�d}d}|�|t|��d}|�|t|��d}|�|t|��d}d}|�|t|��d	}d
}|�|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�rrrRrrr� test_dedent_preserve_margin_tabss"

z/DedentTestCase.test_dedent_preserve_margin_tabsN)
r$r%r&r�r�r�r�r�r�r�rrrrr��sr�c@speZdZdZedZdd�Zdd�Zdd�Zd	d
�Zdd�Z	d
d�Z
dd�Zdd�Zdd�Z
dd�Zdd�ZdS)�IndentTestCase)�Hi.
This is a test.
Testing.zHi.
This is a test.

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

Testing.

cCs"|jD]}|�t|d�|�qdS�Nr8��CASESrrr6rrr�test_indent_nomargin_defaultDs
z+IndentTestCase.test_indent_nomargin_defaultcCs$|jD]}|�t|dd�|�qdSr�r�r6rrr�%test_indent_nomargin_explicit_defaultIs
z4IndentTestCase.test_indent_nomargin_explicit_defaultcCs,dd�}|jD]}|�t|d|�|�qdS)NcSsdS�NTr��linerrr�<lambda>R�z?IndentTestCase.test_indent_nomargin_all_lines.<locals>.<lambda>r8r��r�	predicaterrrr�test_indent_nomargin_all_linesOs
z-IndentTestCase.test_indent_nomargin_all_linescCs,dd�}|jD]}|�t|d|�|�qdS)NcSsdS)NFrr�rrrr�Xr�z5IndentTestCase.test_indent_no_lines.<locals>.<lambda>rvr�r�rrr�test_indent_no_linesVs
z#IndentTestCase.test_indent_no_linescCs&|jD]}|�tt|d��|�qdS)Nrv��ROUNDTRIP_CASESrrrr6rrr�test_roundtrip_spaces\s
z$IndentTestCase.test_roundtrip_spacescCs&|jD]}|�tt|d��|�qdS)Nz		r�r6rrr�test_roundtrip_tabsas
z"IndentTestCase.test_roundtrip_tabscCs&|jD]}|�tt|d��|�qdS)Nz 	  	 r�r6rrr�test_roundtrip_mixedfs
z#IndentTestCase.test_roundtrip_mixedcCs4d}d}t|j|�D]\}}|�t||�|�qdS�Nr{)�"  Hi.
  This is a test.
  Testing.z#  Hi.
  This is a test.

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

  Testing.

��zipr�rr�r�prefix�expectedrrrrr�test_indent_defaultksz"IndentTestCase.test_indent_defaultcCs6d}d}t|j|�D]\}}|�t||d�|�qdSr�r�r�rrr�test_indent_explicit_default}sz+IndentTestCase.test_indent_explicit_defaultcCs>d}d}dd�}t|j|�D]\}}|�t|||�|�qdS)Nr{)r�z%  Hi.
  This is a test.
  
  Testing.z&  
  Hi.
  This is a test.
  Testing.
r�z/  
  Hi.
  This is a test.
  
  Testing.
  
cSsdSr�rr�rrrr��r�z6IndentTestCase.test_indent_all_lines.<locals>.<lambda>r��rr�r�r�rrrrr�test_indent_all_lines�s
z$IndentTestCase.test_indent_all_linescCs>d}d}dd�}t|j|�D]\}}|�t|||�|�qdS)Nr{)r�zHi.
This is a test.
  
Testing.z   
Hi.
This is a test.
Testing.
r�z)  
Hi.
This is a test.
  
Testing.
  
cSs
|��Sr)�stripr�rrrr��r�z8IndentTestCase.test_indent_empty_lines.<locals>.<lambda>r�r�rrr�test_indent_empty_lines�s
z&IndentTestCase.test_indent_empty_linesN)r$r%r&r�r�r�r�r�r�r�r�r�r�r�r�r�rrrrr�0sr�c@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�ShortenTestCasecKst||f|�}|�||�dSr)rrrrrr�
check_shorten�szShortenTestCase.check_shortencCs>d}|�|dd�|�|t|�|�|�|t|�dd�dS)N�<Hello there, how are you this fine day? I'm glad to hear it!�zHello there, [...]rNz9Hello there, how are you this fine day? I'm glad to [...]�r�r
r6rrrr7�s�zShortenTestCase.test_simplecCsnd}|j|dddd�|j|dddd�|j|ddd	d�|j|t|�|dd�|j|t|�d
ddd�dS)Nr�r\zHello there,$$z$$r�r�zHello there, how$$zHello there, $$z $$rNz:Hello there, how are you this fine day? I'm glad to hear$$r�r6rrrr��s�z ShortenTestCase.test_placeholdercCs|�ddd�dS)Nr8r9�r�r)rrrr<�sz!ShortenTestCase.test_empty_stringcCsNd}|�|dd�|�|dd�|�ddd�|�dd	d
�|�ddd�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 [...]rur�r�r6rrrrD�s��zShortenTestCase.test_whitespacec	Cs6tdddd�|�t��tdddd�W5QRXdS)NZxxxxxxxxxxxxxxxxxxxx�z(......))rr�z	(.......))rr�r�r)rrr�$test_width_too_small_for_placeholder�sz4ShortenTestCase.test_width_too_small_for_placeholdercCs|�ddd�dS)NZHelloo�r�r�r)rrr�-test_first_word_too_long_but_placeholder_fits�sz=ShortenTestCase.test_first_word_too_long_but_placeholder_fitsN)
r$r%r&r�r7r�r<rDr�r�rrrrr��s
r��__main__)Zunittest�textwraprrrrrrZTestCaserr'r�r�r�r�r�r�r$�mainrrrr�<module>s 4_E3z9

F1le Man4ger