
    G/PhF	                        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                            d ej        d          d	d
g          ej        d           ej        d          g          d             ZdS )    N)assert_raises_regex)StringIOc                  f    t          t          d          5  t          d          # 1 swxY w Y   d S )Nzno deprecation warning)r   
ValueError     Z/var/www/html/test/jupyter/venv/lib/python3.11/site-packages/numpy/lib/tests/test_utils.py(test_assert_raises_regex_context_managerr
   
   s^    	Z)A	B	B 3 312223 3 3 3 3 3 3 3 3 3s   &**c                  t     G d d          }  G d d          }d } ||          sJ  ||           rJ d S )Nc                       e Zd ZdS )1test_info_method_heading.<locals>.NoPublicMethodsN)__name__
__module____qualname__r   r   r	   NoPublicMethodsr      s        r   r   c                       e Zd Zd ZdS )3test_info_method_heading.<locals>.WithPublicMethodsc                      d S )Nr   r   r   r	   first_methodz@test_info_method_heading.<locals>.WithPublicMethods.first_method   s    Dr   N)r   r   r   r   r   r   r	   WithPublicMethodsr      s#        	 	 	 	 	r   r   c                 v    t                      }t          j        | |           d|                                v S )N)outputzMethods:)r   npinfogetvalue)clsouts     r	   _has_method_headingz5test_info_method_heading.<locals>._has_method_heading   s3    jj
C    S\\^^++r   r   )r   r   r   s      r	   test_info_method_headingr      s                  , , ,
 011111""?333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 d S )Nc                 0    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2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 3 3 
DD"(45&/"J"J"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 d S )N      r-   )r6   r7   r   r5   r.   )r5   s    r	   $test_drop_metadata_identity_and_copyrB   F   sZ     $U++u4444 HUaV,,,E$U++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 3 3
4 4 4&!! !! !!H 	)		dD\	*	 = =	 = = =r   