ó
¦V]c           @   sW   d  d l  Z  d  d l m Z d Z e e e j ƒ  ƒ ƒ Z d e  j	 f d „  ƒ  YZ
 d S(   iÿÿÿÿN(   t   StringIOTreesâ   
cdef int spam                   # line 1

cdef ham():
    a = 1
    b = 2
    c = 3
    d = 4

def eggs():
    pass

cpdef bacon():
    print spam
    print 'scotch'
    print 'tea?'
    print 'or coffee?'          # line 16
t   TestStringIOTreec           B   s;   e  Z d  „  Z d „  Z d „  Z d d „ Z d d „ Z RS(   c         C   s   t  j ƒ  |  _ d  S(   N(   t
   stringtreeR    t   tree(   t   self(    (    s<   lib/python2.7/site-packages/Cython/Tests/TestStringIOTree.pyt   setUp   s    c         C   s   |  j  j ƒ  s t ‚ d  S(   N(   R   t
   allmarkerst   AssertionError(   R   (    (    s<   lib/python2.7/site-packages/Cython/Tests/TestStringIOTree.pyt   test_markers   s    c         C   s?  |  j  d ƒ |  j j ƒ  } |  j  d ƒ |  j j ƒ  } |  j  d ƒ | j ƒ  } |  j  d d | ƒ| j ƒ  } |  j d d | ƒ|  j d d | ƒ|  j d d | ƒ| j ƒ  } |  j d d | ƒ|  j d d | ƒ|  j d d | ƒ|  j |  j j ƒ  t t d d ƒ ƒ ƒ |  j t j	 ƒ  |  j j
 ƒ  j	 ƒ  ƒ d  S(   Ni   i   i   i   i   i   i   i   i   i   R   i   i   i	   i   i
   i   i   (   i   i   i   (   i   i   (   i   i   i   (   i   i   (   t   write_linesR   t   insertion_pointt
   write_linet   assertEqualR   t   listt   ranget   codet   stript   getvalue(   R   t   line_4_to_6_insertion_pointt   line_9_to_13_insertion_pointt   line_4_insertion_pointt   line_9_to_12_insertion_pointt   line_10_insertion_point(    (    s<   lib/python2.7/site-packages/Cython/Tests/TestStringIOTree.pyt   test_insertion"   s"    (c         C   s(   x! | D] } |  j  | d | ƒq Wd  S(   NR   (   R   (   R   t   linenosR   t   lineno(    (    s<   lib/python2.7/site-packages/Cython/Tests/TestStringIOTree.pyR	   ;   s    c         C   sA   | d  k r |  j } n  | j j | ƒ | j t | d ƒ d  S(   Ns   
(   t   NoneR   t   markerst   appendt   writet   linemap(   R   R   R   (    (    s<   lib/python2.7/site-packages/Cython/Tests/TestStringIOTree.pyR   ?   s    N(   t   __name__t
   __module__R   R   R   R   R	   R   (    (    (    s<   lib/python2.7/site-packages/Cython/Tests/TestStringIOTree.pyR      s
   			(   t   unittestt   CythonR    R   R   t   dictt	   enumeratet
   splitlinesR   t   TestCaseR   (    (    (    s<   lib/python2.7/site-packages/Cython/Tests/TestStringIOTree.pyt   <module>   s   