o
    z¨ÊhF	  ã                   @   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   s(   t tdƒ� tdƒ‚1 sw   Y  d S )Nzno deprecation warning)r   Ú
ValueError© r   r   úL/var/www/html/env/lib/python3.10/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„ }||ƒsJ ‚|| ƒ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   sD  dd„ } t jddt jdddid�fgfgdd	id�}t |¡}| ||ƒd
u s(J ‚|jd u s/J ‚|d jd u s8J ‚|d d jd u sCJ ‚t jddgd
ddid�}t |¡}| ||ƒd
u s]J ‚|jd u sdJ ‚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 s™J ‚|jd u s J ‚d S )Nc                 S   s   t j| |dd�S )NÚno)Úcasting)r   Úcan_cast)Údt1Údt2r   r   r   Ú_compare_dtypes#   s   z+test_drop_metadata.<locals>._compare_dtypesÚl1Úl2ÚS8ÚmsgÚtoto©ÚmetadataÚtitiT)Úxz<f8)Úyz<i4)Úalignr"   Ú8fÚuint32)r   ÚdtypeÚ_utils_implÚdrop_metadatar"   )r   ÚdtÚdt_mr   r   r   Útest_drop_metadata"   s8    ÿ

þ
ÿ
ÿ
r.   r)   zi,i,i,iÚf1Úf3Úf8Ú10ic                 C   s<   t  | ¡| u s	J ‚tj| ddid�} t  | ¡jd u sJ ‚d S )Né   é   r!   )r*   r+   r   r)   r"   )r)   r   r   r   Ú$test_drop_metadata_identity_and_copyF   s   r5   )ÚpytestÚnumpyr   Únumpy.testingr   Únumpy.lib._utils_implÚlibr*   Úior   r   r   r.   ÚmarkÚparametrizer)   r5   r   r   r   r   Ú<module>   s    $þÿ