a
    Lf
                     @   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      Zaxis)nparrayviewr   macorer   r   )selfargsortclsZarr_0dZarr_1dZarr_2dresult r   Y/var/www/ai-form-bot/venv/lib/python3.9/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   Z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                   @   s   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   ZarangeZreshapeminimumreducemaximumr   r   r   )r   Zdata1dZdata2dZma_minZma_maxr   r   r   r   test_axis_default+   s    

z$TestMinimumMaximum.test_axis_defaultN)r   r   r    r'   r   r   r   r   r"   )   s   r"   c                   @   s   e Zd Zdd ZdS )TestFromtextfilec                 C   sP   t td}tt" tjj	j
|dd}W d    n1 sB0    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
            ;)Z	delimitor)ioStringIOtextwrapdedentpytestZwarnsDeprecationWarningr   r   ZmrecordsZfromtextfile)r   Ztextfiler   r   r   r   test_fromtextfile_delimitorF   s
    
z,TestFromtextfile.test_fromtextfile_delimitorN)r   r   r    r0   r   r   r   r   r(   E   s   r(   )r!   r.   numpyr   Znumpy.testingr   Znumpy.ma.testutilsr   Znumpy.ma.corer   r*   r,   r   r"   r(   r   r   r   r   <module>   s   