3
���h+ � @ sj d Z ddlZddlZddlZddlZddlZddljj Z
ddlmZ ddl
jZdd� Zejdd� �Zdd � Zejjd
�dd� �Ze
jd
�e
jdd�dd� ��Zdd� Zejejjd�ejjd�ejjd�dd� ����Zejjd�dd� �Zejejjd�dd� ��Zdd� Zejjd d!�ejd"d#� ��Z ejjd$�d%d&� �Z!ejjd$�ejjd'�d(d)� ��Z"d*d+� Z#dS ),z1
Testing that we work in the downstream packages
� N)� DataFramec C s6 y
t j| �S tk
r0 tjd| � d�� Y nX d S )Nzskipping as z not available)� importlib�
import_module�ModuleNotFoundError�pytest�skip)�name� r �>/tmp/pip-build-5_djhm0z/pandas/pandas/tests/test_downstream.pyr s
r c C s t ddddgi�S )N�A� � � )r r r r r
�df s r c C sJ t d�}t d�}dd lj}|j| dd�}|jd k s6t�|j� d k sFt�d S )N�toolz�daskr r )Znpartitions)r Zdask.dataframeZ dataframe�from_pandasr �AssertionErrorZcompute)r r r �ddZddfr r r
� test_dask s
r zignore:Panel class is removedc C s t d�}| j� d k st�d S )N�xarray)r Z to_xarrayr )r r r r r
�test_xarray, s r �cftimer z0.10.4c C sJ dd l } dd l}|jddd�}|j| jddd�dd�}d}||ksFt�d S ) Nr Z0001r
)Zperiodsi� r Znearest)�method)r r Zcftime_rangeZget_locZDatetimeGregorianr )r r �times�result�expectedr r r
�test_xarray_cftimeindex_nearest4 s r c C s t jtjdddg� d S )Nz-OOz-cz
import pandas)�
subprocess�
check_call�sys�
executabler r r r
�test_oo_optimizableA s r" |