o
    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   n/var/www/html/construction_image-detection-poc/venv/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 sJ t jdddid}t|}| ||d
u sJ |jd u sJ 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    $