
    BwgF	                        d dl Z d dlZd dlmZ d dlmc mZ d dlm	Z	 d Z
d Zd Ze j                  j                  d ej                  d      d	d
g    ej                  d       ej                  d      g      d        Zy)    N)assert_raises_regex)StringIOc                  R    t        t        d      5  t        d      # 1 sw Y   y xY w)Nzno deprecation warning)r   
ValueError     Q/var/www/horilla/myenv/lib/python3.12/site-packages/numpy/lib/tests/test_utils.py(test_assert_raises_regex_context_managerr
   
   s)    	Z)A	B 31223 3s   &c                  Z     G d d      }  G d d      }d } ||      sJ  ||       rJ y )Nc                       e Zd Zy)1test_info_method_heading.<locals>.NoPublicMethodsN)__name__
__module____qualname__r   r   r	   NoPublicMethodsr      s    r   r   c                       e Zd Zd Zy)3test_info_method_heading.<locals>.WithPublicMethodsc                       y )Nr   r   r   r	   first_methodz@test_info_method_heading.<locals>.WithPublicMethods.first_method   s    r   N)r   r   r   r   r   r   r	   WithPublicMethodsr      s    	r   r   c                 h    t               }t        j                  | |       d|j                         v S )N)outputzMethods:)r   npinfogetvalue)clsouts     r	   _has_method_headingz5test_info_method_heading.<locals>._has_method_heading   s(    j
C S\\^++r   r   )r   r   r   s      r	   test_info_method_headingr      s=      ,
 0111"?3333r   c            	         d } t        j                  ddt        j                  dddi      fgfgddi      }t        j                  |      } | ||      d	u sJ |j                  J |d   j                  J |d   d   j                  J t        j                  d
dgd	ddi      }t        j                  |      } | ||      d	u sJ |j                  J t        j                  dddi      }t        j                  |      } | ||      d	u sJ |j                  J t        j                  dddi      }t        j                  |      } | ||      d	u sJ |j                  J y )Nc                 2    t        j                  | |d      S )Nno)casting)r   can_cast)dt1dt2s     r	   _compare_dtypesz+test_drop_metadata.<locals>._compare_dtypes#   s    {{3T22r   l1l2S8msgtotometadatatitiT)xz<f8)yz<i4)alignr.   8fuint32)r   dtype_utils_impldrop_metadatar.   )r'   dtdt_ms      r	   test_drop_metadatar:   "   s   3 
DD"((45&/"JKLMN!6?
,B$$R(D2t$,,,==   :&&&:d$$,,, 
<.!6?
,B $$R(D2t$,,,==    
$!6?
,B$$R(D2t$,,,==    
(!6?
,B$$R(D2t$,,,==   r   r5   zi,i,i,if1f3f810ic                     t        j                  |       | u sJ t        j                  | ddi      } t        j                  |       j                  J y )N      r-   )r6   r7   r   r5   r.   )r5   s    r	   $test_drop_metadata_identity_and_copyrB   F   sP     $$U+u444 HHUaV,E$$U+44<<<r   )pytestnumpyr   numpy.testingr   numpy.lib._utils_impllibr6   ior   r
   r   r:   markparametrizer5   rB   r   r   r	   <module>rK      s      - + + 3
4&!!H 	)	dD\	*	=	=r   