ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     ÿØÿà JFIF      ÿÛ „ 	 ( %!1!%)+//.383,7(-.+



-%%-////---/-.+/--+------/------/--0+--/-/-----.-----ÿÀ  ¥2" ÿÄ               ÿÄ J  	     ! 1AQ"aq2‘#BR‚¡ÁÑ3br’¢±Âð$CSƒ²á4c“%DsÓñÿÄ              ÿÄ *        !1AQa‘"2q3±ð#b¡ÿÚ   ? ¼QxJQaÍuò¸Zö Úü8,ÐÚú
"SSn<rçù–´âE—^ªBÖ9À\†¸ÔÁT­ÃÛ5
ëd´³Í#Ý;Þ38œî ¶H£M:wÎ3…³…âpÔF&‚FK¸9„â4àGEõªfÿ ‘ñ(ßw­pŽF|È¥ù®häðÍÑ¶¹‘[ÒinÙW¶ùñY˜Q{›K"išÒ[Ú8žë\F¹@-?v"ÔU”,ìöžkÿ {I‡£šÍ?e
ríV
..............................................................................................................................................................................
.............................................................................                                                  
                                                                                                                                                                                     
{fc           @   s7  d  d l  Z  d  d l m Z d  d l m Z d  d l m Z m Z d  d l	 m
 Z
 d e  j f d     YZ d e  j f d	     YZ d
 e  j f d     YZ d e  j f d     YZ d e  j f d     YZ d d d     YZ d d d     YZ d e  j f d     YZ e d k r3e  j d d d d  n  d S(   iN(   t   FormatParagraph(   t   EditorWindow(   t   Tkt   Text(   t   requirest   Is_Get_Testc           B   sG   e  Z d  Z d Z d Z d Z d Z d Z d   Z d   Z	 d   Z
 RS(	   s   Test the is_ and get_ functionss   # This is a comments   This is not a comments   # This is a comment   s       # This is a comments       This is not a commentc         C   sI   |  j  t j d   |  j  t j d   |  j t j |  j   d  S(   Nt    s   	
(   t
   assertTruet   fpt   is_all_whitet   assertFalset   test_comment(   t   self(    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyt   test_is_all_white   s    c         C   sq   |  j  } | t j |  j  d  | t j |  j  d  | t j |  j  d  | t j |  j  d  d  S(   NR   s       (   t   assertEqualR   t
   get_indentR   t   trailingws_commentt   leadingws_commentt   leadingws_nocomment(   R   t   Equal(    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyt   test_get_indent   s
    	c         C   s   |  j  } | t j |  j  d  | t j |  j  d  | t j |  j  d  | t j |  j  d  | t j |  j  d  d  S(   Nt   #s       #s       R   (   R   R   t   get_comment_headerR   R   R   R   t   test_nocomment(   R   R   (    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyt   test_get_comment_header   s    	(   t   __name__t
   __module__t   __doc__R   R   R   R   R   R   R   R   (    (    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyR   	   s   		t   FindTestc           B   s8   e  Z d  Z e d    Z d   Z d   Z d   Z RS(   s`  Test the find_paragraph function in FormatParagraph.

    Using the runcase() function, find_paragraph() is called with 'mark' set at
    multiple indexes before and inside the test paragraph.

    It appears that code with the same indentation as a quoted string is grouped
    as part of the same paragraph, which is probably incorrect behavior.
    c         C   s    d d l  m } |   |  _ d  S(   Ni(   R   (   t   idlelib.idle_test.mock_tkR   t   text(   t   clsR   (    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyt
   setUpClass2   s    c   	      C   s   |  j  } | j d |  x t d |  D]v } t | j d |  j d  d  } xG d | d | f D]2 } d | | f } |  j t j | |  |  qi Wq) W| j	 d d  d  S(	   Ns   1.0i   s   %d.endt   .i    i   s   %d.%dt   end(
   R   t   insertt   ranget   intt   indext   splitR   R   t   find_paragrapht   delete(	   R   t
   inserttextt   stoplinet   expectedR   t   linet
   linelengtht   colt	   tempindex(    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyt   runcase7   s    	&$c      	   C   sd  d } |  j  | d d d d | d d !f  d } |  j  | d	 d
 d d | d d !f  d } |  j  | d	 d
 d d | d d !f  d } |  j  | d d
 d d | d d !f  d } |  j  | d d
 d d | d d !f  d } |  j  | d d
 d d | d d !f  d } |  j  | d d
 d d | d d !f  d } |  j  | d d
 d d | d d !f  d  S(   Ns;   # Comment block with no blank lines before
# Comment line

i   s   1.0s   3.0R   i    i:   sG   
# Comment block with whitespace line before and after
# Comment line

i   s   2.0s   4.0i   iF   sS   
    # Indented comment block with whitespace before and after
    # Comment line

s       #iR   s   
# Single line comment

i   s4   
    # Single line comment with leading whitespace

i3   s0   
# Comment immediately followed by code
x = 42

i(   s=   
    # Indented comment immediately followed by code
x = 42

i5   s=   
# Comment immediately followed by indented code
    x = 42

i1   (   R1   (   R   t   comment(    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyt   test_find_commentD   s     &&&&&&&c      	   C   s   d } |  j  | d d d d | d d !f  d } |  j  | d	 d
 d d | d d !f  d } |  j  | d	 d
 d d | d d !f  d } |  j  | d d
 d d | d d !f  d } |  j  | d d
 d d | d d !f  d  S(   Ns6   """String with no blank lines before
String line
"""

i   s   1.0s   4.0R   i    i5   sC   
"""String with whitespace line before and after
String line.
"""

i   s   2.0s   5.0i   iB   sV   
    """Indented string with whitespace before and after
    Comment string.
    """

s       iU   s   
"""Single line string."""

i   s   3.0i   s8   
    """Single line string with leading whitespace."""

i7   (   R1   (   R   t
   teststring(    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyt   test_find_paragraphz   s    &&&&(   R   R   R   t   classmethodR    R1   R3   R5   (    (    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyR   (   s
   		6t   ReformatFunctionTestc           B   s   e  Z d  Z d   Z RS(   s?   Test the reformat_paragraph function without the editor window.c         C   s*  |  j  } t j } d } | | d d  d  | | d d  d  | | | d  d  | | | d  d  | | | d	  d
  | | | d  d
  | | | d  d  d } | | | d  d  | | | d  d  | | | d	  d  | | | d  d  | | | d  d  d  S(   Ns   O hello worldt    i   s   Hello    worldi   s   Hello  worlds   O
hello
worldi   i   s   O hello
worldi   i   s   
O hello worlds   
O
hello
worlds   
O hello
world(   R   R   t   reformat_paragraph(   R   R   t   reformt   hw(    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyt   test_reformat_paragraph   s     		(   R   R   R   R<   (    (    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyR7      s   t   ReformatCommentTestc           B   s   e  Z d  Z d   Z RS(   s=   Test the reformat_comment function without the editor window.c         C   si   |  j  } d } t j | d d  } d } | | |  d } t j | d d  } d } | | |  d  S(   Nsu       """this is a test of a reformat for a triple quoted string will it reformat to less than 70 characters for me?"""iF   s       sy       """this is a test of a reformat for a triple quoted string will it
    reformat to less than 70 characters for me?"""sm   # this is a test of a reformat for a triple quoted string will it reformat to less than 70 characters for me?R   so   # this is a test of a reformat for a triple quoted string will it
# reformat to less than 70 characters for me?(   R   R   t   reformat_comment(   R   R   t   test_stringt   resultR,   R   (    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyt   test_reformat_comment   s    	(   R   R   R   RA   (    (    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyR=      s   t   FormatClassTestc           B   s   e  Z d    Z RS(   c         C   sC   t  j d  } |  j | j d  | j   |  j | j d   d  S(   Nt   editor(   R   R    R   t   editwint   closet   None(   R   t   instance(    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyt   test_init_close   s    
(   R   R   RH   (    (    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyRB      s   t   TextWrapperc           B   s,   e  Z d    Z d   Z d   Z d   Z RS(   c         C   s   t  d |  |  _ d  S(   Nt   master(   R   R   (   R   RJ   (    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyt   __init__   s    c         C   s   t  |  j |  S(   N(   t   getattrR   (   R   t   name(    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyt   __getattr__   s    c         C   s   d  S(   N(    (   R   (    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyt   undo_block_start   R   c         C   s   d  S(   N(    (   R   (    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyt   undo_block_stop   R   (   R   R   RK   RN   RO   RP   (    (    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyRI      s   			t   Editorc           B   s   e  Z d    Z e j j Z RS(   c         C   s   t  |  |  _ d  S(   N(   RI   R   (   R   t   root(    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyRK      s    (   R   R   RK   R   t   get_selection_indicest   im_func(    (    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyRQ      s   	t   FormatEventTestc           B   sb   e  Z d  Z d Z d Z d Z e d    Z e d    Z d   Z	 d   Z
 d   Z d	   Z RS(
   s   Test the formatting of text inside a Text widget.

    This is done with FormatParagraph.format.paragraph_event,
    which calls functions in the module as appropriate.
    sv       '''this is a test of a reformat for a triple quoted string will it reformat to less than 70 characters for me?'''
s      '''The first line is under the max width.
    The second line's length is way over the max width. It goes on and on until it is over 100 characters long.
    Same thing with the third line. It is also way over the max width, but FormatParagraph will fix it.
    '''
s,  # The first line is under the max width.
# The second line's length is way over the max width. It goes on and on until it is over 100 characters long.
# Same thing with the third line. It is also way over the max width, but FormatParagraph will fix it.
# The fourth line is short like the first line.c         C   sP   t  d  t   |  _ t d |  j  } | j j |  _ t j |  j |  _ d  S(   Nt   guiRR   (	   R   R   RR   RQ   R   R   R    t   format_paragraph_eventt	   formatter(   R   RC   (    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyR      s
    
c         C   s#   |  `  |  ` |  j j   |  ` d  S(   N(   R   RX   RR   t   destroy(   R   (    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyt   tearDownClass  s    c         C   sV   |  j  j d d  |  j d  |  j |  j  j d d  d  |  j  j d d  d  S(   Ns   1.0s   Short line
t   DummyR#   R"   (   R   R#   RX   R   t   getR)   (   R   (    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyt   test_short_line  s    c         C   s   |  j  } | j d |  j  | j d d  |  j d d d | j d d  } d } |  j | |  | j d d  | j d |  j  | j d d	 d
  |  j d d d | j d d  } d } |  j | |  | j d d  d  S(   Ns   1.0R#   t   ParameterDoesNothingt   limitiF   sz       '''this is a test of a reformat for a triple quoted string will it
    reformat to less than 70 characters for me?'''
R"   t   sels   1.11s   1.endsv       '''this is a test of a reformat for a triple quoted string will it reformat
 to less than 70 characters for me?'''(	   R   R#   R?   t   mark_setRX   R\   R   R)   t   tag_add(   R   R   R@   R,   (    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyt   test_long_line!  s    	c         C   s~   |  j  } | j d |  j  | j d d d  |  j d d d | j d d  } d	 } |  j | |  | j d d
  d  S(   Ns   1.0R`   s   2.0s   4.0R^   R_   iF   R#   s       The second line's length is way over the max width. It goes on and
    on until it is over 100 characters long. Same thing with the third
    line. It is also way over the max width, but FormatParagraph will
    fix it.
R"   (   R   R#   t   multiline_test_stringRb   RX   R\   R   R)   (   R   R   R@   R,   (    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyt   test_multiple_lines<  s    	c         C   s   |  j  } | j d |  j  |  j d d d | j d d  } d } |  j | |  | j d d  | j d |  j  | j d d	 d
  |  j d d d | j d d  } d } |  j | |  | j d d  d  S(   Ns   1.0R^   R_   iF   R#   s/  # The first line is under the max width. The second line's length is
# way over the max width. It goes on and on until it is over 100
# characters long. Same thing with the third line. It is also way over
# the max width, but FormatParagraph will fix it. The fourth line is
# short like the first line.
R"   R`   s   2.0s   3.0s   # The first line is under the max width.
# The second line's length is way over the max width. It goes on and
# on until it is over 100 characters long.
(   R   R#   t   multiline_test_commentRX   R\   R   R)   Rb   (   R   R   R@   R,   (    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyt   test_comment_blockK  s    	(   R   R   R   R?   Rd   Rf   R6   R    RZ   R]   Rc   Re   Rg   (    (    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyRU      s   				t   __main__t	   verbosityi   t   exit(    (    (   t   unittestt   idlelibR    R   t   idlelib.EditorWindowR   t   TkinterR   R   t   test.test_supportR   t   TestCaseR   R   R7   R=   RB   RI   RQ   RU   R   t   main(    (    (    s>   /usr/lib64/python2.7/idlelib/idle_test/test_formatparagraph.pyt   <module>   s   w