+
    Bi                     d   ^ RI t ^ RIHtHtHtHtHtHt  ! R R] P                  4      t	 ! R R]	4      t
 ! R R]	4      t ! R	 R
]	4      t ! R R]	4      t ! R R]	4      t ! R R] P                  4      t ! R R] P                  4      t ! R R]	4      t]R8X  d   ] P&                  ! 4        R# R# )    N)TextWrapperwrapfilldedentindentshortenc                   8   a  ] tR t^t o R tR tR tR tRtV t	R# )BaseTestCasec                :   \        V\        4      '       d]   . p\        \        V4      4       F#  pVP	                  R W1V,          3,          4       K%  	  V'       d   RP                  V4      pV# RpV# \        V\        4      '       d   R\        V4      ,          pX# )z  %d: %r
z
  no linesz  %s
)
isinstancelistrangelenappendjoinstrrepr)selftextinresultis   &&  )/usr/lib/python3.14/test/test_textwrap.pyshowBaseTestCase.show   s    fd##F3v;'jAay>9: (*0TYYv&F  7CF  $$V,F    c           
     v    V P                  WR V P                  V4      : RV P                  V4      : 24       R# )z
expected:
z

but got:
N)assertEqualr   )r   r   expects   &&&r   checkBaseTestCase.check   s0    		&!499V#46	7r   c                @    \        W3/ VB pV P                  WS4       R # N)r   r    r   textwidthr   kwargsr   s   &&&&, r   
check_wrapBaseTestCase.check_wrap#   s    d,V,

6"r   c                p    V P                   P                  V4      pV P                  W2R V: RV: 24       R# )z

expected z

but got  N)wrapper_splitr   )r   r%   r   r   s   &&& r   check_splitBaseTestCase.check_split'   s2    $$T**0&:	;r    N)
__name__
__module____qualname____firstlineno__r   r    r(   r-   __static_attributes____classdictcell____classdict__s   @r   r
   r
      s     7
#; ;r   r
   c                      a  ] tR t^.t o R tR tR tR tR tR t	R t
R tR	 tR
 tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR tR t R t!Rt"V t#R # )!WrapTestCasec                (    \        ^-R7      V n        R# )-   )r&   N)r   r+   r   s   &r   setUpWrapTestCase.setUp0   s    ",r   c                    R pV P                  V^. RO4       V P                  V^*RR.4       V P                  V^PV.4       R# )=Hello there, how are you this fine day?  I'm glad to hear it!z'Hello there, how are you this fine day?zI'm glad to hear it!NHello there,how are you	this finez	day?  I'mzglad to hearzit!r(   r   r%   s   & r   test_simpleWrapTestCase.test_simple3   sP     Ob 	! 	bB/1	2 	b4&)r   c                V    V P                  R ^. 4       V P                  R ^. RR7       R# ) Fdrop_whitespaceNrE   r<   s   &r   test_empty_stringWrapTestCase.test_empty_stringD   s&    Ar"Ar59r   c                \    V P                  R ^. RR7       V P                  R ^. RRR7       R# )rJ   ++initial_indentF)rR   rL   NrE   r<   s   &r   %test_empty_string_with_initial_indent2WrapTestCase.test_empty_string_with_initial_indentI   s,    Ar$7Ar$Nr   c                8   R p. R
Op\        ^-RR7      pVP                  V4      pV P                  WB4       VP                  V4      pV P                  VRP	                  V4      4       RpR.pV P                  V^PV4       RpR.pV P                  V^PV^R7       R	# )zThis 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!
Tfix_sentence_endingsr   z	Test	default		tabsize.z(        Test    default         tabsize.z	Test	custom		tabsize.z     Test    custom      tabsize.)tabsizeN)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 azmess!)r   r   r    r   r   r(   )r   r%   r   r+   r   s   &    r   test_whitespaceWrapTestCase.test_whitespaceN   s     bt<d#

6"d#

6499V,-,<=b&)+45b&!4r   c                   \        ^<RR7      pRpR.pV P                  VP                  V4      V4       RpR.pV P                  VP                  V4      V4       RpV P                  VP                  V4      V4       RpR	.pV P                  VP                  V4      V4       ^Vn        . ROpV P                  VP                  V4      V4       R
p. ROpV P                  VP                  V4      V4       ^<Vn        R.pV P                  VP                  V4      V4       RpR.pV P                  VP                  V4      V4       R# )<   TrV   z$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!z1And she said, "Go to hell!"
Can you believe that?z2And she said, "Go to hell!"  Can you believe that?zFile stdio.h is nice.N)zI say, chaps!zAnyone for "tennis?"zHmmph!)zAnd she said, "Go tozhell!"  Can youzbelieve that?)r   r    r   r&   )r   r+   r%   r   s   &   r   test_fix_sentence_endings&WrapTestCase.test_fix_sentence_endingsn   s,   bt<
 69:

7<<%v.
 256

7<<%v.2

7<<%v.;?@

7<<%v.D

7<<%v.C# 	

7<<%v.FG

7<<%v.&)*

7<<%v.r   c                \    R pV P                  V^RR.4       V P                  V^(R.4       R# )zThis is a
short paragraph.zThis is a shortz
paragraph.zThis is a short paragraph.NrE   rF   s   & r   test_wrap_shortWrapTestCase.test_wrap_short   s8     -b#4#/#1 	2b#?"@Ar   c                ^    R pV P                  V^R .4       V P                  V^R.RR7       R# )zThis is a short line.z(1) This is a short line.z(1) rQ   NrE   rF   s   & r   test_wrap_short_1line"WrapTestCase.test_wrap_short_1line   s;     'b#:";<b#>"?'- 	 	/r   c                   R pV P                  V^(RR.4       V P                  V^)RR.4       V P                  V^*RR.4       RP                  R4      pV P                  V^VRR7       V P                  W4       V P                  R	R	.4       V P                  R
R
.4       V P                  RRP                  R4      4       R# )zBthis-is-a-useful-feature-for-reformatting-posts-from-tim-peters'lyzthis-is-a-useful-feature-for-z%reformatting-posts-from-tim-peters'lyz*this-is-a-useful-feature-for-reformatting-zposts-from-tim-peters'lyzLthis-|is-|a-|useful-|feature-|for-|reformatting-|posts-|from-|tim-|peters'ly|Fbreak_long_wordsze-mailzJelly-Ozhalf-a-crownzhalf-|a-|crownN)r(   splitr-   r   r%   r   s   &  r   test_hyphenatedWrapTestCase.test_hyphenated   s    8 	b8@B	C 	b8@B	C 	bE35	6>?DuSz 	a%@&H:.YK0)9)?)?)DEr   c                j   R pV P                  V^. R	O4       V P                  V^(RR.4       V P                  V^VP                  4       RR7       RpV P                  V^RR.4       V P                  V^RR.4       V P                  V^R.4       V P                  V^VP                  4       RR7       R# )
zRPython 1.0.0 was released on 1994-01-26.  Python 1.0.1 was
released on 1994-02-15.z(Python 1.0.0 was released on 1994-01-26.z(Python 1.0.1 was released on 1994-02-15.Frg   zI do all my shopping at 7-11.zI do all my shopping atz7-11.N)zPython 1.0.0 was released onz1994-01-26.  Python 1.0.1 waszreleased on 1994-02-15.)r(   ri   rF   s   & r   test_hyphenated_numbers$WrapTestCase.test_hyphenated_numbers   s    * 	b #> 	? 	b#M#M#O 	PaF.b#<#*#, 	-b#<#*#, 	-b#B"CDaFr   c                   R pV P                  V^RR.4       V P                  V^RR.4       RR.pV P                  V^V4       V P                  V^#V4       V P                  V^$R .4       Rp. ROpV P                  V^V4       V P                  V^V4       . ROpV P                  V^V4       V P                  V^V4       R
R.pV P                  V^V4       V P                  V^V4       RR	.pV P                  V^ V4       V P                  V^#V4       Rp. ROpV P                  W4       Rp. ROpV P                  W4       R# )z$Em-dashes should be written -- thus.zEm-dashes should bezwritten -- thus.zEm-dashes should be writtenz-- thus.zEm-dashes should be written --zthus.z%You can also do--this or even---this.---this.this.zYou can also do--this or evenz You can also do--this or even---z7Here's an -- em-dash and--here's another---and another!zand then--bam!--he was goneN)zYou can also doz--this or evenrq   )zYou can also do--zthis or even---rr   )zHere's anrs   --rs   zem-dashrs   andru   zhere'srs   anotherz---rw   rs   zanother!)rw   rs   thenru   zbam!ru   hers   wasrs   goner(   r-   rj   s   &  r   test_em_dashWrapTestCase.test_em_dash   sq   5b.+-	. 	b6#%	& 3b&)b&)b?@	B
 7 	b&)b&) 	b&)b&)1b&)b&)4b&)b&) I* 	&,1&r   c                   R pV P                  V^. R	O4       V P                  V^. R
O4       RR.pV P                  V^ V4       V P                  V^"V4       V P                  V^#V4       V P                  V^&V4       RR.pV P                  V^'V4       V P                  V^)V4       RR.pV P                  V^*V4       Rp. ROpV P                  W4       R# )z<You should use the -n option, or --dry-run in its long form.in its long form.z You should use the -n option, orz--dry-run in its long form.z'You should use the -n option, or --dry-zrun in its long form.z*You should use the -n option, or --dry-runz'the -n option, or --dry-run or --dryrunN)zYou should use thez-n option, or --dry-zrun in its longzform.)zYou should use the -nzoption, or --dry-runr   )thers   z-nrs   zoption,rs   orrs   z--dry-runrs   r   rs   z--dryrunr}   rj   s   &  r   test_unix_optionsWrapTestCase.test_unix_options  s     Nb"	#
 	b.	/ 5/1b&)b&)b&)b&);)+b&)b&)>%'b&) 9?&r   c                   V P                  R . R
O4       V P                  R. RO4       V P                  R. RO4       V P                  RR.4       V P                  RR.4       V P                  RRR.4       V P                  R. RO4       R	# )zwhat the--hey!z
what the--zwhat the--.z	--text--.z--optionz--option-opt	--option-optzfoo --option-opt barN)whatrs   r   ru   zhey!)r   rs   zthe--)r   rs   zthe--.)foors   r   r   rs   barr-   r<   s   &r   test_funky_hyphensWrapTestCase.test_funky_hyphens3  s     	)+MN'=>(?@{m4 	j\2+u)=>/E	Gr   c                    V P                  R . RO4       V P                  R. R	O4       V P                  R. R
O4       V P                  R. RO4       V P                  RRP                  R4      4       R# )zthe 'wibble-wobble' widgetzthe "wibble-wobble" widgetzthe (wibble-wobble) widgetzthe ['wibble-wobble'] widgetzwhat-d'you-call-it.zwhat-d'you-|call-|it.rf   N)r   rs   z'wibble-zwobble'rs   widget)r   rs   z"wibble-zwobble"rs   r   )r   rs   z(wibble-zwobble)rs   r   )r   rs   z	['wibble-zwobble']rs   r   )r-   ri   r<   s   &r   test_punct_hyphensWrapTestCase.test_punct_hyphensD  sy     	5K	M5K	M5K	M7M	O 	.066s;	=r   c                ~    V P                  R . RO4       V P                  R. RO4       V P                  R. RO4       R# )zfoo (--option) barzfoo (bar) bazzblah (ding dong), wubbaN)r   rs   z
(--option)rs   r   )r   rs   z(bar)rs   baz)blahrs   z(dingrs   zdong),rs   wubbar   r<   s   &r   test_funky_parensWrapTestCase.test_funky_parensY  sD     	-?	A 	:	<2(	)r   c                8    R pV P                  V^
. RORR7       R# )z0 This is a    sentence with     much whitespace.FrK   N)z
 This is a    z	sentence z	with     z
much whitezspace.rE   rF   s   & r   test_drop_whitespace_false'WrapTestCase.test_drop_whitespace_falsef  s'     Bb>(- 	 	/r   c                2    V P                  R ^R .RR7       R# )   FrK   NrE   r<   s   &r   *test_drop_whitespace_false_whitespace_only7WrapTestCase.test_drop_whitespace_false_whitespace_onlyo  s    q5'5Ar   c                4    V P                  R ^R.RRR7       R# )r        F  )rL   rR   NrE   r<   s   &r   6test_drop_whitespace_false_whitespace_only_with_indentCWrapTestCase.test_drop_whitespace_false_whitespace_only_with_indents  s"     	q7)U'+ 	 	-r   c                ,    V P                  R ^. 4       R# )r   NrE   r<   s   &r   $test_drop_whitespace_whitespace_only1WrapTestCase.test_drop_whitespace_whitespace_onlyy  s    a$r   c                \    R pV P                  V^2R .4       V P                  V^RR.4       R# )z, This is a sentence with leading whitespace.z This is a sentence withzleading whitespace.NrE   rF   s   & r   'test_drop_whitespace_leading_whitespace4WrapTestCase.test_drop_whitespace_leading_whitespace}  s:    
 >bGH	Jb35JK	Mr   c                b    R pV P                  V^. RORR7       V P                  V^RR.4       R# )zabcd    efghabcdefghFrK   N)r   r   r   rE   rF   s   & r   $test_drop_whitespace_whitespace_line1WrapTestCase.test_drop_whitespace_whitespace_line  s9     a!9(- 	 	/a&&!12r   c                0    V P                  R ^. RR7       R# )r   rP   rQ   NrE   r<   s   &r   0test_drop_whitespace_whitespace_only_with_indent=WrapTestCase.test_drop_whitespace_whitespace_only_with_indent  s     	aD9r   c                6    V P                  R ^RR.RRR7       R# )z	abcd efghz  abcdz  efghr   rR   subsequent_indentNrE   r<   s   &r   &test_drop_whitespace_whitespace_indent3WrapTestCase.test_drop_whitespace_whitespace_indent  s&     	Q8(<'+t 	 	Er   c                h    R pV P                   P                  V4      pV P                  V. RO4       R# )z0Hello there -- you goof-ball, use the -b option!N)Hellors   therers   ru   rs   yours   zgoof-zball,rs   users   r   rs   z-brs   zoption!)r+   r,   r    )r   r%   r   s   &  r   
test_splitWrapTestCase.test_split  s3     B$$T*

6K	Lr   c                f    R pV P                  V^
RR.RR7       V P                  V^
RR.RR7       R# )	zyaba daba-dooz
yaba daba-dooTbreak_on_hyphensyabazdaba-dooFNrE   rF   s   & r   test_break_on_hyphens"WrapTestCase.test_break_on_hyphens  sE    b<"7)- 	 	/b6:"6). 	 	0r   c                z    R pV P                  \        \        V^ 4       V P                  \        \        VR4       R# )zWhatever, it doesn't matter.N)assertRaises
ValueErrorr   rF   s   & r   test_bad_widthWrapTestCase.test_bad_width  s/    -*dD!4*dD"5r   c                4    R pV P                  V^. RO4       R# )u   Die Empfänger-AuswahlN)Dieu   Empfänger-AuswahlrE   rF   s   & r   test_no_split_at_umlaut$WrapTestCase.test_no_split_at_umlaut  s    )b"EFr   c                4    R pV P                  V^RR.4       R# )u   aa ää-ääu   aa ää-u   ääNrE   rF   s   & r   test_umlaut_followed_by_dash)WrapTestCase.test_umlaut_followed_by_dash  s    %a.*!=>r   c                f    R pV P                  V^. RORR7       V P                  V^. RORR7       R# )u,   This is a sentence with non-breaking space.Tr   FN)This is a sentence	with non-u   breaking space.)r   withu   non-breaking space.rE   rF   s   & r   test_non_breaking_space$WrapTestCase.test_non_breaking_space  sH    Mb= *.	 	 	/ 	bA */	 	 	0r   c                f    R pV P                  V^. RORR7       V P                  V^. RORR7       R# )u-   This is a sentence with non-breaking space.Tr   FN)r   r   u   breaking space.)r   r   u   non-breaking space.rE   rF   s   & r   test_narrow_non_breaking_space+WrapTestCase.test_narrow_non_breaking_space  sM    2 	bD *.	 	 	/ 	bH */	 	 	0r   )r+   N)$r0   r1   r2   r3   r=   rG   rM   rS   rY   r]   r`   rc   rk   rn   r~   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r4   r5   r6   s   @r   r9   r9   .   s     -*":
O
5@(/TB/F4G(4'n 'DG"=*)/B-%	M3:E	L06G?00 0r   r9   c                   <   a  ] tR tRt o RtR tR tR tR tRt	V t
R# )	MaxLinesTestCasei  r@   c                   V P                  V P                  ^R.^ R7       V P                  V P                  ^R.^R7       V P                  V P                  ^RR.^R7       V P                  V P                  ^RR.^R7       V P                  V P                  ^PV P                  .^R7       V P                  V P                  ^. RO^R7       R# )   zHello [...]	max_linesrB   z	how [...]zhow are [...]NrA   r(   r%   r<   s   &r   rG   MaxLinesTestCase.test_simple  s    		2&"# 	 	% 			2&"# 	 	% 			2'$&"# 	 	% 			2'(*"# 	 	% 			2		{a@		2  #$ 	 	%r   c                    V P                  V P                  ^. RO^R7       V P                  V P                  ^RR.^R7       V P                  V P                  R,           ^. RO^R7       R# )r   r   r   [...]N)rB   rC   rD   z
day? [...]z
          rA   r   r<   s   &r   test_spacesMaxLinesTestCase.test_spaces  sx    		2' #$ 	 	% 			1  ""# 	 	%
 			H,b  #$ 	 	%r   c           
        V P                  V P                  ^R.^RR7       V P                  V P                  ^RR.^RR7       V P                  \        4      ;_uu_ 4        \	        V P                  ^R^RR7       R	R	R	4       V P                  \        4      ;_uu_ 4        \	        V P                  ^R^RR
7       R	R	R	4       V P                  V P                  ^RR.^RRRR7       V P                  V P                  ^R.^RRRR7       V P                  V P                  ^PV P                  .RR7       R	#   + '       g   i     L; i  + '       g   i     L; i)r   zHello...z...r   placeholderrB   z
how are...r   z [truncated]...)rR   r   r   N)r   r   r   z    Hello there,z  [truncated]...r   )r   rR   r   r   r   a  ........................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................)r(   r%   r   r   r   r<   s   &r   test_placeholder!MaxLinesTestCase.test_placeholder  sC   		2#"#$) 	 	+ 			2'%'"#$)	 	 	+ z**Bv*;= + z**B&*;= + 			2++-"#'-*.$5 	 	7 			2+,"#'+*0$5 	 	7 			2		{
K' +* +*s   !D7!E
7E	
E	c                :    R pV P                  V^RR.^RR7       R# )z1Good grief Python features are advancing quickly!z
Good griefzPython*****z*****r   NrE   rF   s   & r   test_placeholder_backtrack+MaxLinesTestCase.test_placeholder_backtrack2  s-    
 Cb%}5"#$+ 	 	-r   r/   N)r0   r1   r2   r3   r%   rG   r   r   r   r4   r5   r6   s   @r   r   r     s%     JD%2%.L@	- 	-r   r   c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )LongWordTestCasei>  c                2    \        4       V n        R V n        R# )z]Did you say "supercalifragilisticexpialidocious?"
How *do* you spell that odd word, anyways?
N)r   r+   r%   r<   s   &r   r=   LongWordTestCase.setUp?  s    "}	r   c                    V P                  V P                  ^. RO4       V P                  V P                  ^2RR.4       V P                  R^
. RORR7       V P                  V P                  ^. R	O4       R# )
   z1Did you say "supercalifragilisticexpialidocious?"z*How *do* you spell that odd word, anyways?)r   N)zDid you say "supercalifragiliszticexpialidocious?" How *do*zyou spell that odd word,anyways?z----------hello)z
----------z               hz               e               lr   z               oz               )	Did you say "supercalifragilisticexpzialidocious?z
" How *do*z	you spellzthat oddzword,r   r   r<   s   &r   test_break_long LongWordTestCase.test_break_longF  s|     			2%	&
 			2LEG	H 	- -3 	 	4 			2%		&r   c                   ^ V P                   n        ^V P                   n        . ROpV P                   P                  V P                  4      pV P                  W!4       \        V P                  ^^ R7      pV P                  W!4       R# )r   )r&   rh   N)zDid you sayz%"supercalifragilisticexpialidocious?"zHow *do* you spell that oddzword, anyways?)r+   rh   r&   r   r%   r    r   r   r   s   &  r   test_nobreak_long"LongWordTestCase.test_nobreak_longj  sg    ()%
 ""499-

6" diirA>

6"r   c                H    V P                  V P                  ^. RO^R7       R# )r   r   N)r   r   r   r   r   r<   s   &r   test_max_lines_long$LongWordTestCase.test_max_lines_longz  s%    		2" #$ 	 	%r   )r%   r+   N)
r0   r1   r2   r3   r=   r   r  r  r4   r5   r6   s   @r   r   r   >  s     "&H# % %r   r   c                   >   a  ] tR tRt o R tR tR tR tR tRt	V t
R# )	LongWordWithHyphensTestCasei  c                @    \        4       V n        R V n        RV n        R# )zOWe used enyzme 2-succinyl-6-hydroxy-2,4-cyclohexadiene-1-carboxylate synthase.
zC1234567890-1234567890--this_is_a_very_long_option_indeed-good-bye"
N)r   r+   text1text2r<   s   &r   r=   !LongWordWithHyphensTestCase.setUp  s    "}

r   c                    R R.pV P                  V P                  ^2V4       . ROpV P                  V P                  ^
V4       . ROpV P                  V P                  ^
V4       R# )z(We used enyzme 2-succinyl-6-hydroxy-2,4-z&cyclohexadiene-1-carboxylate synthase.N)
We usedz	enyzme 2-z	succinyl-z
6-hydroxy-z2,4-
cyclohexadziene-1-
carboxylate	synthase.
1234567890z
-123456789z
0--this_is
_a_very_lo
ng_option_zindeed-z	good-bye"r(   r  r  r   expecteds   & r   test_break_long_words_on_hyphen;LongWordWithHyphensTestCase.test_break_long_words_on_hyphen  sZ    ><>

B1M

B1:

B1r   c                    R R.pV P                  V P                  ^2VRR7       . ROpV P                  V P                  ^
VRR7       . ROpV P                  V P                  ^
V4       R# )z2We used enyzme 2-succinyl-6-hydroxy-2,4-cyclohexadziene-1-carboxylate synthase.Fr   N)r  z
enyzme 2-sz
uccinyl-6-z
hydroxy-2,z
4-cyclohexz
adiene-1-c
arboxylater  r  r  r  s   & r   #test_break_long_words_not_on_hyphen?LongWordWithHyphensTestCase.test_break_long_words_not_on_hyphen  sb    H24

B5IK

B5I:

B1r   c                    . ROpV P                  V P                  ^2VRR7       . ROpV P                  V P                  ^
VRR7       . ROpV P                  V P                  ^
V4       R# )We used enyzmeFrg   Nr"  52-succinyl-6-hydroxy-2,4-cyclohexadiene-1-carboxylater  r  enyzmer$  r  r  r  r  s   & r   'test_break_on_hyphen_but_not_long_wordsCLongWordWithHyphensTestCase.test_break_on_hyphen_but_not_long_words  s_    ! 	

B5I! 	

B5I:

B1r   c                    . ROpV P                  V P                  ^2VRRR7       . ROpV P                  V P                  ^
VRRR7       . ROpV P                  V P                  ^
V4       R# )r"  F)rh   r   Nr#  r%  r  r  r  s   & r   *test_do_not_break_long_words_or_on_hyphensFLongWordWithHyphensTestCase.test_do_not_break_long_words_or_on_hyphens  sq    ! 	

B).). 	 	0! 	

B).). 	 	0:

B1r   )r  r  r+   N)r0   r1   r2   r3   r=   r  r  r'  r*  r4   r5   r6   s   @r   r	  r	    s#     222"2 2r   r	  c                   8   a  ] tR tRt o R tR tR tR tRtV t	R# )IndentTestCasesi  c                    R V n         R# )znThis paragraph will be filled, first without any indentation,
and then with some (including a hanging indent).Nr%   r<   s   &r   r=   IndentTestCases.setUp  s    4	r   c                X    R p\        V P                  ^(4      pV P                  W!4       R# )znThis paragraph will be filled, first
without any indentation, and then with
some (including a hanging indent).Nr   r%   r    r  s   &  r   	test_fillIndentTestCases.test_fill  s'    &
 dii$

6"r   c                    . ROp\        V P                  ^(RR7      pV P                  W!4       RP                  V4      p\	        V P                  ^(RR7      pV P                  W!4       R# )#     This paragraph will be filled,r   rQ   r   N)r6  z'first without any indentation, and thenz'with some (including a hanging indent).)r   r%   r    r   r   r  s   &  r   test_initial_indent#IndentTestCases.test_initial_indent  sU    = diiG<

6"6"diiG<

6"r   c                ^    R p\        V P                  ^(RRR7      pV P                  W!4       R# )z~  * This paragraph will be filled, first
    without any indentation, and then
    with some (including a hanging
    indent).z  * r   r   Nr2  r  s   &  r   test_subsequent_indent&IndentTestCases.test_subsequent_indent  s/     dii%+vG

6"r   r/  N)
r0   r1   r2   r3   r=   r3  r7  r:  r4   r5   r6   s   @r   r-  r-    s     4	### #r   r-  c                   V   a  ] tR tRt o R tR tR tR tR tR t	R t
R	 tR
 tRtV tR# )DedentTestCasei  c                   V P                  \        R 4      ;_uu_ 4        \        ^ 4       RRR4       V P                  \        R 4      ;_uu_ 4        \        R4       RRR4       R#   + '       g   i     LD; i  + '       g   i     R# ; i)zexpected str object, notNr   )assertRaisesRegex	TypeErrorr   r<   s   &r   test_type_errorDedentTestCase.test_type_error   s`    ##I/IJJ1I K ##I/IJJ3K KJ KJ KJJs   A'A:'A7	:B	c                <    V P                  V\        V4      4       R # r#   r   r   rF   s   &&r   assertUnchangedDedentTestCase.assertUnchanged  s    vd|,r   c                Z   R pV P                  V4       RpR pV P                  V\        V4      4       RpR pV P                  V\        V4      4       RpR pV P                  V\        V4      4       RpRpV P                  V\        V4      4       RpRpV P                  V\        V4      4       RpRpV P                  V\        V4      4       RpRpV P                  V\        V4      4       RpR	pV P                  V\        V4      4       R
pRpV P                  V\        V4      4       R# )rJ   r   z				z
 	  		  	 z
	 r   z    
	
  
		


       z





za
 
	
za


za


za


Nz





z




rE  r   r   rj   s   &  r   test_dedent_whitespace%DedentTestCase.test_dedent_whitespace  s5   T" . .  . . . . 1. . .r   c                    R pV P                  V4       RpV P                  V4       RpV P                  V4       RpV P                  V4       R# )z,Hello there.
How are you?
Oh good, I'm glad.zHello there.

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

  Boo!
N)rE  rF   s   & r   test_dedent_nomargin#DedentTestCase.test_dedent_nomargin=  sT    ?T" &T" 3T" *T"r   c                    R pRpV P                  V\        V4      4       RpRpV P                  V\        V4      4       RpRpV P                  V\        V4      4       R# )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.
z+  Hello there.
  
  How are ya?
  Oh good.
NrD  rj   s   &  r   test_dedent_evenDedentTestCase.test_dedent_evenN  sa    :6. ?:. A:.r   c                    R pRpV P                  V\        V4      4       RpRpV P                  V\        V4      4       RpRpV P                  V\        V4      4       R# )zK        def foo():
            while 1:
                return foo
        z+def foo():
    while 1:
        return foo
z  Foo
    Bar

   Baz
zFoo
  Bar

 Baz
z  Foo
    Bar
 
   Baz
NrD  rj   s   &  r   test_dedent_uneven!DedentTestCase.test_dedent_uneven^  sf    

 	. ,'. -'.r   c                    R pRpV P                  V\        V4      4       RpRpV P                  V\        V4      4       RpRpV P                  V\        V4      4       R# )z     Foo
    Bar
z	 Foo
Bar
z     Foo

    Bar
z
 Foo

Bar
z     Foo
    
    Bar
NrD  rj   s   &  r   test_dedent_declining$DedentTestCase.test_dedent_decliningv  s`    $. ' . + .r   c                z    R pRpV P                  V\        V4      4       V P                  V\        V4      4       R# )z  hello	there
  how are	you?zhello	there
how are	you?NrD  rj   s   &  r   "test_dedent_preserve_internal_tabs1DedentTestCase.test_dedent_preserve_internal_tabs  s6    0.. 	0r   c                   R pV P                  V4       RpV P                  V4       RpRpV P                  V\        V4      4       RpV P                  V\        V4      4       RpV P                  V\        V4      4       RpRpV P                  V\        V4      4       RpR	pV P                  V\        V4      4       R
# )z  hello there
	how are you?z!        hello there
	how are you?z	hello there
	how are you?zhello there
how are you?z  	hello there
  	how are you?z"  	  hello there
  	  how are you?z   	hello there
  	  how are you?zhello there
  how are you?z2  	hello there
   	how are you?
 	I'm fine, thanksz/ 	hello there
  	how are you?
	I'm fine, thanksNrH  rj   s   &  r    test_dedent_preserve_margin_tabs/DedentTestCase.test_dedent_preserve_margin_tabs  s    .T" 5T" /,.2.6.4.. IG.r   r/   N)r0   r1   r2   r3   rA  rE  rI  rL  rO  rR  rU  rX  r[  r4   r5   r6   s   @r   r=  r=    s8     -0/d#"/ /0/"1/ /r   r=  c                   x   a  ] tR tRt o Rt]R,           tR tR tR tR t	R t
R tR tR	 tR
 tR tR tRtV tR# )IndentTestCasei  c                d    V P                    F  pV P                  \        VR 4      V4       K!  	  R# rJ   NCASESr   r   rF   s   & r   test_indent_nomargin_default+IndentTestCase.test_indent_nomargin_default  s'    JJDVD"-t4 r   c                f    V P                    F   pV P                  \        VR R4      V4       K"  	  R# r`  ra  rF   s   & r   %test_indent_nomargin_explicit_default4IndentTestCase.test_indent_nomargin_explicit_default  s+     JJDVD"d3T: r   c                l    R  pV P                    F   pV P                  \        VRV4      V4       K"  	  R# )c                     R # Tr/   lines   &r   <lambda>?IndentTestCase.test_indent_nomargin_all_lines.<locals>.<lambda>      r   rJ   Nra  r   	predicater%   s   &  r   test_indent_nomargin_all_lines-IndentTestCase.test_indent_nomargin_all_lines  s0     &	JJDVD"i8$? r   c                l    R  pV P                    F   pV P                  \        VRV4      V4       K"  	  R# )c                     R # )Fr/   rk  s   &r   rm  5IndentTestCase.test_indent_no_lines.<locals>.<lambda>  s    r   r   Nra  rp  s   &  r   test_indent_no_lines#IndentTestCase.test_indent_no_lines  s.    &	JJDVD&)<dC r   c           	     v    V P                    F(  pV P                  \        \        VR 4      4      V4       K*  	  R# )r   NROUNDTRIP_CASESr   r   r   rF   s   & r   test_roundtrip_spaces$IndentTestCase.test_roundtrip_spaces  .    ((DVF4$894@ )r   c           	     v    V P                    F(  pV P                  \        \        VR 4      4      V4       K*  	  R# )z		Nrz  rF   s   & r   test_roundtrip_tabs"IndentTestCase.test_roundtrip_tabs  r~  r   c           	     v    V P                    F(  pV P                  \        \        VR 4      4      V4       K*  	  R# )z 	  	 Nrz  rF   s   & r   test_roundtrip_mixed#IndentTestCase.test_roundtrip_mixed  s.    ((DVF4$<=tD )r   c                    R pRp\        V P                  V4       F   w  r4V P                  \        W14      V4       K"  	  R# r   N)"  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.

ziprb  r   r   r   prefixr  r%   r   s   &    r   test_indent_default"IndentTestCase.test_indent_default  s<    
  

H5LDVD16: 6r   c                    R pRp\        V P                  V4       F!  w  r4V P                  \        W1R4      V4       K#  	  R# r  r  r  s   &    r   test_indent_explicit_default+IndentTestCase.test_indent_explicit_default  s>    
  

H5LDVD$7@ 6r   c                    R pRpR p\        V P                  V4       F!  w  rEV P                  \        WAV4      V4       K#  	  R# )r   c                     R # rj  r/   rk  s   &r   rm  6IndentTestCase.test_indent_all_lines.<locals>.<lambda>  ro  r   N)r  z%  Hi.
  This is a test.
  
  Testing.z&  
  Hi.
  This is a test.
  Testing.
r  z/  
  Hi.
  This is a test.
  
  Testing.
  
r  r   r  r  rq  r%   r   s   &     r   test_indent_all_lines$IndentTestCase.test_indent_all_lines  sC    
 &	

H5LDVD)<fE 6r   c                    R pRpR p\        V P                  V4       F!  w  rEV P                  \        WAV4      V4       K#  	  R# )r   c                 ,    V P                  4       '       * # r#   )striprk  s   &r   rm  8IndentTestCase.test_indent_empty_lines.<locals>.<lambda>2  s    TZZ\!1r   N)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.
  
r  r  s   &     r   test_indent_empty_lines&IndentTestCase.test_indent_empty_lines#  sC    
 2	

H5LDVD)<fE 6r   r/   N)r  zHi.
This is a test.

Testing.z
Hi.
This is a test.
Testing.
)r  z#
Hi.
This is a test.

Testing.

)r0   r1   r2   r3   r{  rb  rc  rf  rr  rw  r|  r  r  r  r  r  r  r4   r5   r6   s   @r   r^  r^    sb     
O   E5
;@DA
A
E
;$A$F&F Fr   r^  c                   J   a  ] tR tRt o R tR tR tR tR tR t	R t
R	tV tR
# )ShortenTestCasei7  c                @    \        W3/ VB pV P                  WS4       R # r#   )r   r    r$   s   &&&&, r   check_shortenShortenTestCase.check_shorten9  s    //

6"r   c                    R pV P                  V^R4       V P                  V\        V4      V4       V P                  V\        V4      ^,
          R4       R# )<Hello there, how are you this fine day? I'm glad to hear it!zHello there, [...]z9Hello there, how are you this fine day? I'm glad to [...]Nr  r   rF   s   & r   rG   ShortenTestCase.test_simple=  sO    M4%9:4TD14TQ 	!r   c                   R pV P                  V^RRR7       V P                  V^RRR7       V P                  V^RRR7       V P                  V\        V4      VRR7       V P                  V\        V4      ^,
          RRR7       R# )	r  zHello there,$$z$$r   zHello there, how$$zHello there, $$z $$z:Hello there, how are you this fine day? I'm glad to hear$$Nr  rF   s   & r   r    ShortenTestCase.test_placeholderG  s    M4%54H4%9tL4%6EJ4TDdC4TQ!.2 	 	4r   c                ,    V P                  R ^R 4       R# r`  r  r<   s   &r   rM   !ShortenTestCase.test_empty_stringR  s    2q"%r   c                    R pV P                  V^>R4       V P                  V^=R4       V P                  R^R4       V P                  R^R4       V P                  R^
R4       R# )z[
            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 [...]zhello      world!  zhello world!zhello [...]r   Nr  rF   s   & r   rY   ShortenTestCase.test_whitespaceU  sx    , 	44	5 	40	1 	0"nE0"mD 	0"g>r   c                    \        R^RR7       V P                  \        4      ;_uu_ 4        \        R^RR7       RRR4       R#   + '       g   i     R# ; i)xz(......))r&   r   z	(.......)Nxxxxxxxxxxxxxxxxxxxx)r   r   r   r<   s   &r   $test_width_too_small_for_placeholder4ShortenTestCase.test_width_too_small_for_placeholderg  s:    z:z**HA;? +***s   AA	c                ,    V P                  R ^R4       R# )Helloor   Nr  r<   s   &r   -test_first_word_too_long_but_placeholder_fits=ShortenTestCase.test_first_word_too_long_but_placeholder_fitsl  s    8Q0r   r/   N)r0   r1   r2   r3   r  rG   r   rM   rY   r  r  r4   r5   r6   s   @r   r  r  7  s.     #!	4&?$@
1 1r   r  __main__)unittesttextwrapr   r   r   r   r   r   TestCaser
   r9   r   r   r	  r-  r=  r^  r  r0   mainr/   r   r   <module>r     s     E E;8$$ ;<n0< n0b\-| \-~B% B%JF2, F2P.#l .#fo/X&& o/fCFX&& CFL61l 61r zMMO r   