U
    Cvf                     @  sJ   d dl mZ d dlZd dlmZmZ d dlmZmZ eG dd dZ	dS )    )annotationsN)	DataArraytutorial)assert_identicalnetworkc                   @  s<   e Zd Zejdddd ZddddZddd	d
ZdS )TestLoadDatasetT)Zautousec                 C  s
   d| _ d S )Ntiny)testfile)self r   >/tmp/pip-unpacked-wheel-h316xyqg/xarray/tests/test_tutorial.pysetUp   s    zTestLoadDataset.setUpNone)returnc                 C  s@   |t j }t j| j|d }ttddd }t|| d S )N	cache_dir   r   )name)	r   _default_cache_dir_nameopen_datasetr	   loadr   rangeZ
to_datasetr   )r
   tmp_pathr   Zdsr   r   r   r   test_download_from_github   s    
z)TestLoadDataset.test_download_from_githubc                 C  sB   |t j }t j| jd|d }t j| j|d }t|| d S )NF)cacher   r   )r   r   r   r	   r   r   )r
   r   Zmonkeypatchr   Z
ds_nocacheZds_cacher   r   r   ,test_download_from_github_load_without_cache   s    
  
z<TestLoadDataset.test_download_from_github_load_without_cacheN)__name__
__module____qualname__pytestZfixturer   r   r   r   r   r   r   r   	   s   

r   )

__future__r   r   Zxarrayr   r   Zxarray.testsr   r   r   r   r   r   r   <module>   s
   