ó
î&]\c           @` s  d  Z  d d l m Z m Z m Z d d l Z d d l Z d d l m Z d d l	 m
 Z
 e j j d k Z d Z d Z d	 Z d
 Z i e d 6e d 6e d 6Z d Z d   Z d   Z d   Z e j j e d d d    Z e j j e d d d    Z d S(   s@    Some tests for the documenting decorator and support functions i    (   t   divisiont   print_functiont   absolute_importN(   t   assert_equal(   t   docceri   sB   Docstring
    %(strtest1)s
        %(strtest2)s
     %(strtest3)s
s    Another test
   with some indents   Another test, one lines(       Another test
       with some indentt   strtest1t   strtest2t   strtest3s|   Docstring
    Another test
       with some indent
        Another test, one line
     Another test
       with some indent
c           C` sF   t  t j t  t  t  t j t  t  t  t j t  t  d  S(   N(   R   R   t   unindent_stringt
   param_doc1t
   param_doc2t
   param_doc3(    (    (    s;   lib/python2.7/site-packages/scipy/misc/tests/test_doccer.pyt   test_unindent-   s    c          C` sR   t  j t  }  t |  d t d  t |  d t d  t |  d t d  d  S(   NR   R   R   (   R   t   unindent_dictt   doc_dictR   (   t   d2(    (    s;   lib/python2.7/site-packages/scipy/misc/tests/test_doccer.pyt   test_unindent_dict3   s    c          C` sW   t  j t  }  t  j t |   } t | t  d } t  j | t  } t | d  d  S(   Ns   Single line doc %(strtest1)ss0   Single line doc Another test
   with some indent(   R   R   R   t	   docformatt	   docstringR   t   filled_docstring(   t   uddt	   formattedt
   single_doc(    (    s;   lib/python2.7/site-packages/scipy/misc/tests/test_doccer.pyt   test_docformat:   s    t   reasons   docstrings strippedc          C` sf   t  j t t  }  |  d    } t | j d  t  j t t  }  |  d    } t | j d  d  S(   Nc           S` s   d S(   s(    Docstring
        %(strtest3)s
        N(    (    (    (    s;   lib/python2.7/site-packages/scipy/misc/tests/test_doccer.pyt   funcK   s    sD    Docstring
        Another test
           with some indent
        c           S` s   d S(   s(    Docstring
        %(strtest3)s
        N(    (    (    (    s;   lib/python2.7/site-packages/scipy/misc/tests/test_doccer.pyR   X   s    sL    Docstring
            Another test
               with some indent
        (   R   t   filldocR   t   TrueR   t   __doc__t   False(   t	   decoratorR   (    (    s;   lib/python2.7/site-packages/scipy/misc/tests/test_doccer.pyt   test_decoratorF   s    		c          ` sŤ   d t  f d     Y  d   f   f d     Y}  t |  j j   j j d  t |  j j   j j  |    } t | j j   j j d  t | j j   j j  d  S(   Nt   Fooc           B` s   e  Z d    Z d   Z RS(   c         S` s   d S(   s   Do something useful.N(    (   t   self(    (    s;   lib/python2.7/site-packages/scipy/misc/tests/test_doccer.pyR   g   s    c         S` s   d S(   s   Something else.N(    (   R!   (    (    s;   lib/python2.7/site-packages/scipy/misc/tests/test_doccer.pyt   func2k   s    (   t   __name__t
   __module__R   R"   (    (    (    s;   lib/python2.7/site-packages/scipy/misc/tests/test_doccer.pyR    f   s   	t   Barc           ` s8   e  Z e j    d     Z e j    d    Z RS(   c         S` s   d S(   s   %(super)sABCN(    (   R!   (    (    s;   lib/python2.7/site-packages/scipy/misc/tests/test_doccer.pyR   o   s    c         S` s   d  S(   N(    (   R!   (    (    s;   lib/python2.7/site-packages/scipy/misc/tests/test_doccer.pyR"   t   s    (   R#   R$   R   t   inherit_docstring_fromR   R"   (    (   R    (    s;   lib/python2.7/site-packages/scipy/misc/tests/test_doccer.pyR%   n   s   t   ABC(   t   objectR   R   R   R"   (   R%   t   bar(    (   R    s;   lib/python2.7/site-packages/scipy/misc/tests/test_doccer.pyt   test_inherit_docstring_fromc   s    	(   R   t
   __future__R    R   R   t   syst   pytestt   numpy.testingR   t
   scipy.miscR   t   flagst   optimizet   DOCSTRINGS_STRIPPEDR   R	   R
   R   R   R   R   R   R   t   markt   skipifR   R*   (    (    (    s;   lib/python2.7/site-packages/scipy/misc/tests/test_doccer.pyt   <module>   s&   

				!