Changeset 14 for formatflowed

Show
Ignore:
Timestamp:
09/07/05 01:01:43 (7 years ago)
Author:
mj
Message:

Change doctest to avoid reliance on whitespace at end of lines.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • formatflowed/trunk/formatflowed.py

    r13 r14  
    699699     
    700700        >>> CRLF = '\\r\\n' 
    701         >>> print convertToWrapped(CRLF.join(( 
     701        >>> result = convertToWrapped(CRLF.join(( 
    702702        ... ">> `Take some more tea,' the March Hare said to Alice, very ", 
    703703        ... ">> earnestly.", 
     
    710710        ... "", 
    711711        ... "-- ", 
    712         ... "Lewis Caroll")), width=65) 
    713         >> `Take some more tea,' the March Hare said to Alice, very 
    714         >> earnestly. 
    715         >  
    716         > `I've had nothing yet,' Alice replied in an offended tone, `so 
    717         > I can't take more.' 
    718         <BLANKLINE> 
    719         `You mean you can't take less,' said the Hatter: `it's very easy 
    720         to take more than nothing.' 
    721         <BLANKLINE> 
    722         --  
    723         Lewis Caroll 
    724          
    725     (Although not directly visible in this example, the output contains 
    726     a trailing space at the end of the empty quoted line and the signature 
    727     seperator). 
    728      
     712        ... "Lewis Caroll")), width=60) 
     713        >>> result.split('\\n') == [ 
     714        ...   ">> `Take some more tea,' the March Hare said to Alice, very", 
     715        ...   ">> earnestly.",  
     716        ...   "> ", 
     717        ...   "> `I've had nothing yet,' Alice replied in an offended tone,", 
     718        ...   "> `so I can't take more.'", 
     719        ...   "", 
     720        ...   "`You mean you can't take less,' said the Hatter: `it's very", 
     721        ...   "easy to take more than nothing.'", 
     722        ...   "", 
     723        ...   "-- ", 
     724        ...   "Lewis Caroll"] 
     725        True 
     726         
    729727    """ 
    730728    result = []