o
    g
                     @   sv   d Z ddlZddlZddlmZ ddlmZ ddlm	Z	 ddl
Z
ddlZG dd dZG dd	 d	ZG d
d dZdS )z'Test deprecation and future warnings.

    N)assert_warns)assert_equal)MaskedArrayFutureWarningc                   @   s0   e Zd ZdZdd Zdd Zdd Zdd	 Zd
S )TestArgsortz	 gh-8701 c                 C   s   t d|}|| t g d|}|| t ddgddgg|}tt jjj||}t|||d d ||d d ||dd d S )N   )r         r   r      axis)nparrayviewr   macorer   r   )selfargsortclsarr_0darr_1darr_2dresult r   Z/var/www/html/api-tag/env/lib/python3.10/site-packages/numpy/ma/tests/test_deprecations.py
_test_base   s   zTestArgsort._test_basec                 C   s   |  tjjtjS N)r   r   r   r   ndarrayr   r   r   r   test_function_ndarray   s   z!TestArgsort.test_function_ndarrayc                 C   s   |  tjjtjjS r   )r   r   r   r   MaskedArrayr   r   r   r   test_function_maskedarray"   s   z%TestArgsort.test_function_maskedarrayc                 C   s   |  tjjjtjjS r   )r   r   r   r    r   r   r   r   r   test_method%   s   zTestArgsort.test_methodN)__name__
__module____qualname____doc__r   r   r!   r"   r   r   r   r   r      s    r   c                   @      e Zd Zdd ZdS )TestMinimumMaximumc                 C   s   t jd}|dd}t jjj}t jjj}tt||}t	|||d d tt||}t	|||d d ||}t	|||d d t	|||dd ||}t	|||d d t	|||dd d S )N   r   r   r
   r   )
r   r   arangereshapeminimumreducemaximumr   r   r   )r   data1ddata2dma_minma_maxr   r   r   r   test_axis_default+   s   

z$TestMinimumMaximum.test_axis_defaultN)r#   r$   r%   r3   r   r   r   r   r(   )   s    r(   c                   @   r'   )TestFromtextfilec                 C   sR   t td}tt tjj	j
|dd}W d    d S 1 s"w   Y  d S )Nz
            A,B,C,D
            'string 1';1;1.0;'mixed column'
            'string 2';2;2.0;
            'string 3';3;3.0;123
            'string 4';4;4.0;3.14
            ;)	delimitor)ioStringIOtextwrapdedentpytestwarnsDeprecationWarningr   r   mrecordsfromtextfile)r   textfiler   r   r   r   test_fromtextfile_delimitorF   s   
"z,TestFromtextfile.test_fromtextfile_delimitorN)r#   r$   r%   rA   r   r   r   r   r4   E   s    r4   )r&   r;   numpyr   numpy.testingr   numpy.ma.testutilsr   numpy.ma.corer   r7   r9   r   r(   r4   r   r   r   r   <module>   s    