a :jg @svdZddlZddlZddlmZddlmZddlm Z ddl Z ddl Z GdddZ Gdd d Z Gd d d ZdS) z'Test deprecation and future warnings. N) assert_warns) assert_equal)MaskedArrayFutureWarningc@s0eZdZdZddZddZddZdd Zd S) TestArgsortz gh-8701 cCstd|}||tgd|}||tddgddgg|}ttjjj||}t|||dd||dd||dddS)N)rrrZaxis)nparrayviewrmacorerr)selfargsortclsZarr_0dZarr_1dZarr_2dresultrJ/usr/local/lib/python3.9/site-packages/numpy/ma/tests/test_deprecations.py _test_bases  zTestArgsort._test_basecCs|tjjtjSN)rr rrZndarrayrrrrtest_function_ndarraysz!TestArgsort.test_function_ndarraycCs|tjjtjjSr)rr rr MaskedArrayrrrrtest_function_maskedarray"sz%TestArgsort.test_function_maskedarraycCs|tjjjtjjSr)rr rrrrrrr test_method%szTestArgsort.test_methodN)__name__ __module__ __qualname____doc__rrrrrrrrr s rc@seZdZddZdS)TestMinimumMaximumcCstjd}|dd}tjjj}tjjj}tt||}t |||ddtt||}t |||dd||}t |||ddt |||dd||}t |||ddt |||dddS)Nrrr r) r rZarangeZreshapeminimumreducemaximumrrr)rZdata1dZdata2dZma_minZma_maxrrrrtest_axis_default+s      z$TestMinimumMaximum.test_axis_defaultN)rrr r'rrrrr")sr"c@seZdZddZdS)TestFromtextfilecCsPttd}tt"tjj j |dd}Wdn1sB0YdS)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) ioStringIOtextwrapdedentpytestZwarnsDeprecationWarningr rZmrecordsZ fromtextfile)rZtextfilerrrrtest_fromtextfile_delimitorFs  z,TestFromtextfile.test_fromtextfile_delimitorN)rrr r0rrrrr(Esr()r!r.numpyr Z numpy.testingrZnumpy.ma.testutilsrZ numpy.ma.corerr*r,rr"r(rrrrs