a
    p=ic
                     @   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   q/home/droni/.local/share/virtualenvs/DPS-5Je3_V2c/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d Zdd ZdS )TestMinimumMaximumc                 C   s    t ttjjtjddg d S Nr   r   )r   DeprecationWarningr   r   minimumr   r   r   r   r   test_minimum*   s    zTestMinimumMaximum.test_minimumc                 C   s    t ttjjtjddg d S r#   )r   r$   r   r   maximumr   r   r   r   r   test_maximum-   s    zTestMinimumMaximum.test_maximumc                 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reshaper%   reducer'   r   r   r   )r   Zdata1dZdata2dZma_minZma_maxr   r   r   r   test_axis_default0   s    

z$TestMinimumMaximum.test_axis_defaultN)r   r   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warnsr$   r   r   ZmrecordsZfromtextfile)r   Ztextfiler   r   r   r   test_fromtextfile_delimitorK   s
    
z,TestFromtextfile.test_fromtextfile_delimitorN)r   r   r    r3   r   r   r   r   r,   J   s   r,   )r!   r2   numpyr   Znumpy.testingr   Znumpy.ma.testutilsr   Znumpy.ma.corer   r.   r0   r   r"   r,   r   r   r   r   <module>   s   !