a
    ç´«jF	  ã                   @   sŒ   d dl Z d dlZd dlmZ d dlm  mZ d dlm	Z	 dd„ Z
dd„ Zdd	„ Ze j d
e d¡ddg e d¡e d¡g¡dd„ ƒZdS )é    N)Úassert_raises_regex)ÚStringIOc                   C   s6   t tdƒ� tdƒ‚W d   ƒ n1 s(0    Y  d S )Nzno deprecation warning)r   Ú
ValueError© r   r   úY/var/www/html/laksyashrimp/venv/lib/python3.9/site-packages/numpy/lib/tests/test_utils.pyÚ(test_assert_raises_regex_context_manager
   s    r   c                  C   s@   G dd„ dƒ} G dd„ dƒ}dd„ }||ƒs0J ‚|| ƒr<J ‚d S )Nc                   @   s   e Zd ZdS )z1test_info_method_heading.<locals>.NoPublicMethodsN)Ú__name__Ú
__module__Ú__qualname__r   r   r   r   ÚNoPublicMethods   s   r   c                   @   s   e Zd Zdd„ ZdS )z3test_info_method_heading.<locals>.WithPublicMethodsc                   S   s   d S )Nr   r   r   r   r   Úfirst_method   s    z@test_info_method_heading.<locals>.WithPublicMethods.first_methodN)r   r	   r
   r   r   r   r   r   ÚWithPublicMethods   s   r   c                 S   s    t ƒ }tj| |d� d| ¡ v S )N)ÚoutputzMethods:)r   ÚnpÚinfoÚgetvalue)ÚclsÚoutr   r   r   Ú_has_method_heading   s    z5test_info_method_heading.<locals>._has_method_headingr   )r   r   r   r   r   r   Útest_info_method_heading   s
    r   c                  C   sJ  dd„ } t jddt jdddid�fgfgdd	id�}t |¡}| ||ƒd
u sPJ ‚|jd u s^J ‚|d jd u spJ ‚|d d jd u s†J ‚t jddgd
ddid�}t |¡}| ||ƒd
u sºJ ‚|jd u sÈJ ‚t jdddid�}t |¡}| ||ƒd
u söJ ‚|jd u �sJ ‚t jdddid�}t |¡}| ||ƒd
u �s6J ‚|jd u �sFJ ‚d S )Nc                 S   s   t j| |dd�S )NÚno)Zcasting)r   Zcan_cast)Zdt1Zdt2r   r   r   Ú_compare_dtypes#   s    z+test_drop_metadata.<locals>._compare_dtypesÚl1Úl2ZS8ÚmsgZtoto©ÚmetadataZtitiT)Úxz<f8)Úyz<i4)Úalignr   Z8fZuint32)r   ÚdtypeÚ_utils_implÚdrop_metadatar   )r   ÚdtZdt_mr   r   r   Útest_drop_metadata"   s8     ÿ

þ
ÿ
ÿ
r$   r    zi,i,i,iÚf1Zf3Zf8Z10ic                 C   s<   t  | ¡| u sJ ‚tj| ddid�} t  | ¡jd u s8J ‚d S )Né   é   r   )r!   r"   r   r    r   )r    r   r   r   Ú$test_drop_metadata_identity_and_copyF   s    r(   )ZpytestÚnumpyr   Znumpy.testingr   Znumpy.lib._utils_implÚlibr!   Úior   r   r   r$   ÚmarkZparametrizer    r(   r   r   r   r   Ú<module>   s   $þÿ