
    tKg                     $   d Z ddlZddlZddlmZmZ ddlmZ ej                  j                  dkD  Z
dZdZdZd	Zeeed
ZdZd Zd Zd Zej(                  j+                  e
d      d        Zej(                  j+                  e
d      d        Zy)z@ Some tests for the documenting decorator and support functions     N)assert_equalsuppress_warnings)doccer   zBDocstring
    %(strtest1)s
        %(strtest2)s
     %(strtest3)s
z Another test
   with some indentzAnother test, one linez(    Another test
       with some indent)strtest1strtest2strtest3z|Docstring
    Another test
       with some indent
        Another test, one line
     Another test
       with some indent
c                  X   t               5 } | j                  t               t        t	        j
                  t              t               t        t	        j
                  t              t               t        t	        j
                  t              t               d d d        y # 1 sw Y   y xY w)Ncategory)	r   filterDeprecationWarningr   r   unindent_string
param_doc1
param_doc2
param_doc3)sups    `/home/alanp/www/video.onchill/myenv/lib/python3.12/site-packages/scipy/misc/tests/test_doccer.pytest_unindentr   +   sd    		

.
/V++J7DV++J7DV++J7D	 
		s   BB  B)c                  $   t               5 } | j                  t               t        j                  t
              }d d d        t        d   t
        d          t        |d   t
        d          t        |d   t
        d          y # 1 sw Y   LxY w)Nr   r   r   r	   )r   r   r   r   unindent_dictdoc_dictr   )r   d2s     r   test_unindent_dictr   3   sr    		

.
/!!(+ 
 J*!56J*!56J*!56 
	s   0BBc                  D   t               5 } | j                  t               t        j                  t
              }t        j                  t        |      }t        |t               d}t        j                  |t
              }t        |d       d d d        y # 1 sw Y   y xY w)Nr   zSingle line doc %(strtest1)sz0Single line doc Another test
   with some indent)
r   r   r   r   r   r   	docformat	docstringr   filled_docstring)r   udd	formatted
single_docs       r   test_docformatr"   <   sz    		

.
/""8,$$Y4	Y 013
$$Z:	 	Y ! 	 
		s   BBBzdocstrings stripped)reasonc                     t               5 } | j                  t               t        j                  t
        d      }|d        }d }t        |j                  |j                         t        j                  t
        t        j                  dk  rdnd      }|d        }d }t        |j                  |j                         d d d        y # 1 sw Y   y xY w)	Nr   Tc                       yz0 Docstring
            %(strtest3)s
            N r'       r   funcztest_decorator.<locals>.funcQ       r(   c                       y)zP Docstring
            Another test
               with some indent
            Nr'   r'   r(   r   expectedz test_decorator.<locals>.expectedW   r*   r(   )      Fc                       yr&   r'   r'   r(   r   r)   ztest_decorator.<locals>.funce   r*   r(   c                       y)zX Docstring
                Another test
                   with some indent
            Nr'   r'   r(   r   r,   z test_decorator.<locals>.expectedj   r*   r(   )
r   r   r   r   filldocr   r   __doc__sysversion_info)r   	decoratorr)   r,   s       r   test_decoratorr6   J   s    		

.
/NN8T2			 
	
	
 	T\\8#3#34 NN8#&#3#3g#= .3CGI	 
	 
		
 	T\\8#3#34G 
		s   B6C

Cc                  X   t               5 } | j                  t                G d d       G fdd      }d d d        t        j                  j
                  j                  j
                  dz          t        |j                  j
                  j                  j
                          |       }t        |j                  j
                  j                  j
                  dz          t        |j                  j
                  j                  j
                         y # 1 sw Y   xY w)Nr   c                       e Zd Zd Zd Zy)(test_inherit_docstring_from.<locals>.Fooc                      y)zDo something useful.Nr'   selfs    r   r)   z-test_inherit_docstring_from.<locals>.Foo.funcy   s    r(   c                      y)zSomething else.Nr'   r;   s    r   func2z.test_inherit_docstring_from.<locals>.Foo.func2}   r*   r(   N)__name__
__module____qualname__r)   r>   r'   r(   r   Foor9   x   s    &r(   rB   c                   r    e Zd Z ej                  W        d        Z ej                  W        d        Zy)(test_inherit_docstring_from.<locals>.Barc                      y)z%(super)sABCNr'   r;   s    r   r)   z-test_inherit_docstring_from.<locals>.Bar.func        r(   c                      y )Nr'   r;   s    r   r>   z.test_inherit_docstring_from.<locals>.Bar.func2   rF   r(   N)r?   r@   rA   r   inherit_docstring_fromr)   r>   )rB   s   r   BarrD      sC    *V**3/ 0 +V**3/ 0r(   rI   ABC)r   r   r   r   r)   r2   r>   )r   rI   barrB   s      @r   test_inherit_docstring_fromrL   r   s     
	

.
/	& 	&		# 		 
, !!388#3#3e#;<""CII$5$56
%C!!388#3#3e#;<""CII$5$565 
	s   .D  D))r2   r3   pytestnumpy.testingr   r   
scipy._libr   flagsoptimizeDOCSTRINGS_STRIPPEDr   r   r   r   r   r   r   r   r"   markskipifr6   rL   r'   r(   r   <module>rU      s    F 
  9  ii((1,  
 
    "!!#
 E7 '0EF$5 G$5N '0EF7 G7r(   