/ lib / numpy / conftest.pyc
conftest.pyc
 1  o

 2  Z��c8�@s@dZddlZddlZddlZddlZddlZddlmZdaiZ	ej
 3  �ej�
e��d��ejjdddd�ejjdddddej��d	�ej�
ej�e�d
 4  d�Zej�ej�e�r\dnd�dd
�Zdd�Zdd�Ze��dd��Zejddd�dd��Zejdd�dd��Zejdd�dd��Z ejddgd�dd ��Z!dS)!z=
 5  Pytest configuration and fixtures for the Numpy test suite.
 6  �N)�get_fpu_modez.hypothesisz
numpy-profileT)�name�deadline�
 7  print_blobznp.test() profile)rrr�databaseZderandomizeZsuppress_health_checkz..z
 8  pytest.inicCs4|�dd�|�dd�|�dd�|�dd�dS)N�markersz=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.)Zaddinivalue_line)�config�r	��C:\Users\Jacks.GUTTSPC\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\numpy\conftest.py�pytest_configure,s����rcCs|jddddd�dS)Nz--available-memory�storez�Set 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.)�action�default�help)Z	addoption)�parserr	r	r
 9  �pytest_addoption7s
10  
11  �rcCs&|j�d�}|dur|tjd<dSdS)NZavailable_memory�NPY_AVAILABLE_MEM)r�	getoption�os�environ)�sessionZ
available_memr	r	r
12  �pytest_sessionstartAs�rcCs6t�}tdur|adS|tkrt|ft|<|adSdS)z�
13      Check FPU precision mode was not changed during test collection.
14  
15      The clumsy way we do it here is mainly necessary because numpy
16      still uses yield tests, which can execute code at test collection
17      time.
18      N)r�
_old_fpu_mode�_collect_results)�item�moder	r	r
19  �pytest_itemcollectedHs�r�function)�scope�autouseccs\�t�}dVt�}||krtd�||���t�|j�}|dur,|\}}td�||���dS)zC
20      Check FPU precision mode was not changed during the test.
21      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)r�AssertionError�formatr�get�node)�request�old_mode�new_modeZcollect_resultr	r	r
22  �check_fpu_mode\s"�����r')rcCst|d<dS)N�np)�numpy)Zdoctest_namespacer	r	r
23  �add_npqsr*cCs|�dd�dS)NZPYTHONHASHSEED�0)�setenv)�monkeypatchr	r	r
24  �	env_setupusr.F)�paramsccs<�t��}|jrt�d�nt�d�|jVt�|�dS)z�
25      Fixture to ensure "legacy" promotion state or change it to use the new
26      weak promotion (plus warning).  `old_promotion` should be used as a
27      parameter in the function.
28      �
weak_and_warn�legacyN)r)�_get_promotion_state�param�_set_promotion_state)r$�stater	r	r
29  �weak_promotionzs�
30  r6)"�__doc__r�tempfile�
31  hypothesis�pytestr)�numpy.core._multiarray_testsrrr�
configurationZset_hypothesis_home_dir�path�join�
32  gettempdir�settingsZregister_profileZHealthCheck�all�dirname�__file__�_pytest_iniZload_profile�isfilerrrZhookimplr�fixturer'r*r.r6r	r	r	r
33  �<module>sJ����
34  
35  
36  
37  
38  
39  
40