;i" dZddlZddlZddlZddlZddlZddlmZddlZddl Z ddl Z ddl Z ddl m Z ddlmZmZddlmZ ddlmZdZn #e$rd ZYnwxYwdaiZejejejd ejd dd ejd dddde ej!ejej"e#ddZ$ej%ej&e$rd nd dej'd<dZ(dZ)dZ*erej+Z*dZ,dZ-e j.dZ/e j0dddZ1e j0ddZ2e j0ddZ3ered4dZ4e4e_5ej67dej67d de_8ddl9Z9e9j:e9j;ze_<e j=j>ej?d!<hd"e_@d#d#d$d%d&d'd(e_Agd)e_Be j0d*ZCe j0dd g+d,ZDe j0d-dee jEeFd.d/ggd01d2ZGe j0d3ZHdS)5z= Pytest configuration and fixtures for the Numpy test suite. N)contextmanager) get_fpu_mode)get_stringdtype_dtypepd_NA) NOGIL_BUILD) dt_configTFz .hypothesisz numpy-profile)namedeadline print_blobznp.test() profile)r r r database derandomizesuppress_health_checkz..z pytest.ini1NUMPY_EXPERIMENTAL_DTYPE_APIc|dd|dd|dd|dddS)Nmarkersz=valgrind_error: Tests that are known to error under valgrind.z:leaks_references: Tests that are known to leak references.zslow: Tests that are very slow.z,slow_pypy: Tests that are very slow on pypy.)addinivalue_line)configs BC:\PYTHON\MyICR_Workspace\venv\Lib\site-packages\numpy/conftest.pypytest_configurer;s IGIII IDFFF I)+++ I688888c8|dddddS)Nz--available-memorystorezSet amount of memory available for running the test suite. This can result to tests requiring especially large amounts of memory to be skipped. Equivalent to setting environment variable NPY_AVAILABLE_MEM. Default: determinedautomatically.)actiondefaulthelp) addoption)parsers rpytest_addoptionrFs5 )'4,.....rc`|jd}||tjd<dSdS)Navailable_memoryNPY_AVAILABLE_MEM)r getoptionosenviron)session available_mems rpytest_sessionstartr(Us9N,,-?@@M *7 &'''! rctrtstjr|}||dddd|d|d|d|d|d |d |d tjd d dSdSdSdS)NzGIL re-enabled=T)sepredboldz3The GIL was re-enabled at runtime during the tests.z;This can happen with no test failures if the RuntimeWarningz9raised by Python when this happens is filtered by a test.z;Please ensure all new C modules declare support for runningz:without the GIL. Any new tests that intentionally imports z:code that re-enables the GIL should do so in a subprocess.zGIL re-enabled during tests) returncode) rgil_enabled_at_startsys_is_gil_enabledensure_newlinesectionlinepytestexit)terminalreporter exitstatusrtrs rpytest_terminal_summaryr<[s A/ AC4G4I4I A   #$T BBB EFFF MNNN KLLL   MNNN LMMM LMMM 1a@@@@@@ A A A A A Arcxt}t|adS|tkrt|ft|<|adSdS)z Check FPU precision mode was not changed during test collection. The clumsy way we do it here is mainly necessary because numpy still uses yield tests, which can execute code at test collection time. N)r _old_fpu_mode_collect_results)itemmodes rpytest_itemcollectedrBjsH >>D   "/!6   rfunction)scopeautousec#Kt}dVt}||krtd|dd|ddt|j}||\}}td|dd|dddS)zC Check FPU precision mode was not changed during the test. Nz FPU precision mode changed from z#xz to z during the testz when collecting the test)rAssertionErrorr?getnode)requestold_modenew_modecollect_results rcheck_fpu_moderN~s ~~H EEE~~H8>Q>> (=>>>?? ?&))',77N!+(GQGG (FGGGHH H"!r)rEct|d<dS)Nnp)numpy)doctest_namespaces radd_nprSs#drc2|dddS)NPYTHONHASHSEED0)setenv) monkeypatchs r env_setuprYs'-----rc#>Kgd}d|}ddg}d|}tj5tjdt|tjdt |dVddddS#1swxYwYdS)z4Filter out the wall of DeprecationWarnings. ) zThe numpy.linalg.linalgzThe numpy.fft.helperdep_util pkg_resourcesznumpy.core.umath msvccompilerzDeprecated callz numpy.corezImporting from numpy.matlibzThis function is deprecated.zData type alias 'a'zArrays of 2-dimensional vectorsz`in1d` is deprecated|zinvalid value encounteredzdivide by zero encounteredignore)categorymessageN)joinwarningscatch_warningsfilterwarningsDeprecationWarningRuntimeWarning)testmsgsmsgmsgs_rmsg_rs rwarnings_errors_and_rngrms  * * *hhtnn ( (     $ & &    ##5s      #>5     EEE                  s=BBBz#uninitializedz# uninitialized StringDType> numpy.saveznumpy.matlib.saveznumpy.__array_namespace_info__%numpy.matlib.__array_namespace_info__r.z needs pandasz#errors out in /testing/overrides.pyz(.. testcode:: admonitions not understoodzmanipulates warnings)zhow-to-verify-bug.rstzc-info.ufunc-tutorial.rstzbasics.interoperability.rstzbasics.dispatch.rstzbasics.subclassing.rstzmisc.rst)znumpy/distutilsznumpy/_core/cversions.pyznumpy/_pyinstallerznumpy/random/_examplesz"numpy/f2py/_backends/_distutils.pycttjtjz}t j|d}tj|dd}|dS)NU1)dtypeiT)sizereplaceU100) liststring ascii_lettersdigitsrParrayrandomchoiceview)charsrets rrandom_string_listrs[ % 5 6 6E HU$ ' ' 'E )  5x  > >C 88F  r)paramsc|jSNparamrJs rcoercers =runsetnan__nan__)rNonez pandas.NAznp.nanz float('nan')z string nan)ridsc|jSrrrs r na_objectrs =rc"t||Sr)r)rrs rrurus F 3 33rr)I__doc__r$rzr2tempfilerc contextlibr hypothesisr7rQrPnumpy._core._multiarray_testsrnumpy._core.tests._natyperrnumpy.testing._private.utilsrscipy_doctest.conftestr HAVE_SCPDTModuleNotFoundErrorr>r? configurationset_hypothesis_home_dirpathrb gettempdirsettingsregister_profilery HealthCheckdirname__file__ _pytest_ini load_profileisfiler%rrr1r3r(r<hookimplrBfixturerNrSrYrmuser_context_mgr rndm_markersadd strict_checkdoctestNORMALIZE_WHITESPACEELLIPSIS optionflagsdtypesrncheck_namespaceskiplistpytest_extra_xfailpytest_extra_ignorerrrfloatrrurrrs %%%%%% 666666BBBBBBBB444444000000JJJJJ  00GLL$$&& 66 $$ 4D% $$  dTt$z566%gll27??844dLII  w~~k22KOO8K .1 )*888...1.3.00888 A A A&j$///HH0/H&$$$...M^D"9I/000 0111"INNN#87;KKI05|/GIm,I"$%''5D"L* $$I %%%I!e}%%%&% T5"&%%,, BNNN 44444sA AA