a
    LfJ	                     @   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   S/var/www/ai-form-bot/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 sJ t jddgd
ddid}t|}| ||d
u sJ |jd u sJ t jdddid}t|}| ||d
u sJ |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   $