3
UdZ                 @   sf   d dl mZ d dlZd dlmZ d dljZdd Zdd Z	dd	 Z
d
d Zdd Zdd Zdd ZdS )    )dedentN)	deprecatec               C   s   dS )z
    This is the summary. The deprecate directive goes next.

    This is the extended summary. The deprecate directive goes before this.
    znew_func called r   r   r   T/var/www/html/virt/lib64/python3.6/site-packages/pandas/tests/util/test_deprecate.pynew_func
   s    r   c               C   s   dS )Nznew_func_no_docstring calledr   r   r   r   r   new_func_no_docstring   s    r   c               C   s   dS )z#Summary should be in the next line.znew_func_wrong_docstring calledr   r   r   r   r   new_func_wrong_docstring   s    r   c               C   s   dS )z
    This is the summary. The deprecate directive goes next.

    .. deprecated:: 1.0
        Use new_func instead.

    This is the extended summary. The deprecate directive goes before this.
    Nr   r   r   r   r   new_func_with_deprecation   s    	r	   c           
   C   sP   t dtddd} tjt |  }W d Q R X |dks8t| jttjksLtd S )N	depr_funcz1.0zUse new_func instead.)msgznew_func called)	r   r   tmassert_produces_warningFutureWarningAssertionError__doc__r   r	   )r
   resultr   r   r   test_deprecate_ok(   s
    r   c           	   C   s<   t dtddd} tjt |  }W d Q R X |dks8td S )Nr
   z1.0zUse new_func instead.)r   znew_func_no_docstring called)r   r   r   r   r   r   )r
   r   r   r   r   test_deprecate_no_docstring2   s
    r   c              C   s2   d} t jt| d tdtddd W d Q R X d S )Nz/deprecate needs a correctly formatted docstring)matchr
   z1.0zUse new_func instead.)r   )pytestZraisesr   r   r   )r   r   r   r   test_deprecate_wrong_docstring;   s    r   )textwrapr   r   Zpandas.util._decoratorsr   Zpandas._testingZ_testingr   r   r   r   r	   r   r   r   r   r   r   r   <module>   s   
	
	