f `dZddlZddlZddlZddlmZddlZddlZddlZddl Z ddl m Z ddl m Z  ddlmZdZdaiZej(j+ej,j/ej0d ej2j5d dd ej2j5d ddddeej8 ej,j/ej,j;eddZej2jAej,jCerd nd dejDd<dZ#dZ$dZ%e rejLZ%dZ'dZ(ejRdZ*ejVdddZ,ejVddZ-ejVddZ.ejVddgdZ/ered+dZ0e0e_1ejdjgd ejdjgd!ddl4Z4e4jje4jlze_7e jpjrejtd"<e;gd#e_<d$d$d%d&d'd(d)e_=gd*e_>yy#e$rdZYrwxYw),z= Pytest configuration and fixtures for the Numpy test suite. N)contextmanager) get_fpu_mode) NOGIL_BUILD) dt_configTFz .hypothesisz numpy-profile)namedeadline print_blobznp.test() profile)rrr database derandomizesuppress_health_checkz..z pytest.ini1NUMPY_EXPERIMENTAL_DTYPE_APIc|jdd|jdd|jdd|jddy)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 W/var/lib/jenkins/workspace/mettalog/venv/lib/python3.12/site-packages/numpy/conftest.pypytest_configurer8sP IGI IDF I)+ I68c.|jddddy)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_addoptionrCs! )'4,.rcf|jjd}||tjd<yy)Navailable_memoryNPY_AVAILABLE_MEM)r getoptionosenviron)session available_mems rpytest_sessionstartr&Rs1NN,,-?@M *7 &'!rctrtstjr|}|j |j dddd|j d|j d|j d|j d|j d |j d |j d tjd d yyyy)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:Xs/C4G4G4I   #$T B EF MN KL   MN LM LM 1a@5J/{rc`t}t|ay|tk7rt|ft|<|ayy)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_itemcollectedr@gs8 >D  "/!6  rfunction)scopeautousec#Kt}dt}||k7rtdj||tj |j }| |\}}tdj||yw)zC Check FPU precision mode was not changed during the test. Nz@FPU precision mode changed from {0:#x} to {1:#x} during the testzIFPU precision mode changed from {0:#x} to {1:#x} when collecting the test)rAssertionErrorformatr=getnode)requestold_modenew_modecollect_results rcheck_fpu_moderM{s ~H ~H8006x0JL L&))',,7N!+(99?@H:JK K"sA;A=)rCct|d<y)Nnp)numpy)doctest_namespaces radd_nprRs #drc(|jddy)NPYTHONHASHSEED0)setenv) monkeypatchs r env_setuprXs'-r)paramsc#Ktj}|jrtjdntjd|jtj|yw)z Fixture to ensure "legacy" promotion state or change it to use the new weak promotion (plus warning). `old_promotion` should be used as a parameter in the function. weak_and_warnlegacyN)rP_get_promotion_stateparam_set_promotion_state)rIstates rweak_promotionrasQ  & & (E}} ""?3 ""8, -- u%sA0A2c#*Kgd}dj|}ddg}dj|}tj5tjdt|tjdt |ddddy#1swYyxYww)z4Filter out the wall of DeprecationWarnings. )zThe numpy.linalg.linalgzThe numpy.fft.helperdep_util pkg_resourcesznumpy.core.umath msvccompilerzDeprecated callz numpy.corez `np.compat`zImporting 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_rngrus *hhtn ( (    $ $ &   # ##5s   # #>5     s?B=B> BB Bz#uninitializedz# uninitialized StringDType)z numpy.savezznumpy.matlib.savezznumpy.__array_namespace_info__z%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/compatz"numpy/f2py/_backends/_distutils.py)N)?__doc__r"r0tempfile contextlibrrk hypothesisr5rPnumpy._core._multiarray_testsrnumpy.testing._private.utilsrscipy_doctest.conftestr HAVE_SCPDTModuleNotFoundErrorr<r= configurationset_hypothesis_home_dirpathrj gettempdirsettingsregister_profilelist HealthCheckdirname__file__ _pytest_ini load_profileisfiler#rrr/r1r&r:hookimplr@fixturerMrRrXraruuser_context_mgr rndm_markersadddoctestNORMALIZE_WHITESPACEELLIPSIS optionflagsdtypesrvcheck_namespacesetskiplistpytest_extra_xfailpytest_extra_ignorerrrs % 640J   00GGLL$$$& 6 $$ 4D% $$  dTtz556%ggll277??84dLI  ww~~k2O8K .1 )*8..3..08 A&j$/K0K($$..e}% && &   F"9I/0 01#887;K;KKI05||/G/GIm,I"$%''5D"L* $I %I!KmJsJ""J-,J-