B
    T\f              
   @   s   d dl mZmZmZ d dlZd dlmZmZmZ e	dZ
dedede
de
d	e
jd	d
dgde
jde
jddd gZejdedd Zejdedd Zejdedd ZdS )    )absolute_importdivisionprint_functionN)hashershash_bufferhash_buffer_hexZnumpys   abcs   123s   456*   )d   r	   )aZi4)bZi2)Zdtypei'     xc             C   sd   x^d gt  D ]P}t| |d}t|ts*tdt|  krBdk sHn t|t| |dkstqW d S )N)hasher       )r   r   
isinstancebytesAssertionErrorlen)r   r   h r   6lib/python3.7/site-packages/dask/tests/test_hashing.pytest_hash_buffer   s
    r   c             C   sd   x^d gt  D ]P}t| |d}t|ts*tdt|  krBdk sHn t|t| |dkstqW d S )N)r      @   )r   r   r   strr   r   )r   r   r   r   r   r   test_hash_buffer_hex   s
    r   r   c             C   s<   d}| |}t |tstdt|  kr2dk s8n td S )N   xr   r   )r   r   r   r   )r   r   r   r   r   r   test_hashers'   s    r   )Z
__future__r   r   r   ZpytestZdask.hashingr   r   r   ZimportorskipZnp	bytearray
memoryviewZarrayZonesZzerosZint8ZbuffersZmarkZparametrizer   r   r   r   r   r   r   <module>   s   
		