
    Pi6                         d Z ddl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eeed
ZdZd Zd Zd Zej                            e
d          d             Zej                            e
d          d             ZdS )z@ Some tests for the documenting decorator and support functions     N)assert_equal)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                     t          j                    5  t          j        dt                     t	          t          j        t                    t                     t	          t          j        t                    t                     t	          t          j        t                    t                     d d d            d S # 1 swxY w Y   d S )Nignorecategory)
warningscatch_warningssimplefilterDeprecationWarningr   r   unindent_string
param_doc1
param_doc2
param_doc3     p/home/jaya/work/projects/VOICE-AGENT/VIET/agent-env/lib/python3.11/site-packages/scipy/_lib/tests/test_doccer.pytest_unindentr   ,   s    		 	"	" E Eh1CDDDDV+J77DDDV+J77DDDV+J77DDD	E E E E E E E E E E E E E E E E E Es   B CCCc                     t          j                    5  t          j        dt                     t	          j        t                    } d d d            n# 1 swxY w Y   t          | d         t          d                    t          | d         t          d                    t          | d         t          d                    d S )Nr
   r   r   r   r   )r   r   r   r   r   unindent_dictdoc_dictr   )d2s    r   test_unindent_dictr   4   s    		 	"	" , ,h1CDDDD!(++, , , , , , , , , , , , , , , J*!5666J*!5666J*!566666s   5AAAc                  |   t          j                    5  t          j        dt                     t	          j        t                    } t	          j        t          |           }t          |t                     d}t	          j        |t                    }t          |d           d d d            d S # 1 swxY w Y   d S )Nr
   r   zSingle line doc %(strtest1)sz0Single line doc Another test
   with some indent)r   r   r   r   r   r   r   	docformat	docstringr   filled_docstring)udd	formatted
single_docs      r   test_docformatr%   =   s    		 	"	" 
 
h1CDDDD"8,,$Y44	Y 01113
$Z::	 	Y ! 	 	 	
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
s   BB11B58B5zdocstrings stripped)reasonc                     t          j                    5  t          j        d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            d S # 1 swxY w Y   d S )
Nr
   r   Tc                      dS z0 Docstring
            %(strtest3)s
            Nr   r   r   r   funcztest_decorator.<locals>.funcR         r   c                      dS )zP Docstring
            Another test
               with some indent
            Nr   r   r   r   expectedz test_decorator.<locals>.expectedX   r+   r   )      Fc                      dS r)   r   r   r   r   r*   ztest_decorator.<locals>.funcf   r+   r   c                      dS )zX Docstring
                Another test
                   with some indent
            Nr   r   r   r   r-   z test_decorator.<locals>.expectedk   r+   r   )r   r   r   r   r   filldocr   r   __doc__sysversion_info)	decoratorr*   r-   s      r   test_decoratorr7   K   sM   		 	"	" #5 #5h1CDDDDN8T22			 	 
	
	 	 	
 	T\8#3444 N8#&#3g#=#= .3UCGI I	 
	 	 
		 	 	
 	T\8#3444G#5 #5 #5 #5 #5 #5 #5 #5 #5 #5 #5 #5 #5 #5 #5 #5 #5 #5s   B2CCCc                     t          j                    5  t          j        dt                      G d d           G fdd          } d d d            n# 1 swxY w Y   t	          | j        j        j        j        dz              t	          | j        j        j        j                    |             }t	          |j        j        j        j        dz              t	          |j        j        j        j                   d S )Nr
   r   c                       e Zd Zd Zd ZdS )(test_inherit_docstring_from.<locals>.Fooc                     dS )zDo something useful.Nr   selfs    r   r*   z-test_inherit_docstring_from.<locals>.Foo.funcz   s    r   c                     dS )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   Foor:   y   s2          & & & & &r   rC   c                   t    e Zd Z ej                   d             Z ej                   d             ZdS )(test_inherit_docstring_from.<locals>.Barc                     dS )z%(super)sABCNr   r<   s    r   r*   z-test_inherit_docstring_from.<locals>.Bar.func   	     r   c                     d S )Nr   r<   s    r   r?   z.test_inherit_docstring_from.<locals>.Bar.func2   rG   r   N)r@   rA   rB   r   inherit_docstring_fromr*   r?   )rC   s   r   BarrE      se        *V*3//  0/ +V*3//  0/  r   rJ   ABC)r   r   r   r   r   r*   r3   r?   )rJ   barrC   s     @r   test_inherit_docstring_fromrM   s   sa    
	 	"	"  h1CDDDD	& 	& 	& 	& 	& 	& 	& 	&		 		 		 		 		 		 		# 		 		 		              , !38#3e#;<<<"CI$5666
#%%C!38#3e#;<<<"CI$566666s   9AA!A)r3   r4   r   pytestnumpy.testingr   
scipy._libr   flagsoptimizeDOCSTRINGS_STRIPPEDr    r   r   r   r   r!   r   r   r%   markskipifr7   rM   r   r   r   <module>rV      sH   F F 



   & & & & & &       i(1,  
 
    "!!# #
 E E E7 7 7   '0EFF$5 $5 GF$5N '0EFF7 7 GF7 7 7r   