HOME


sh-3ll 1.0
DIR:/usr/local/lib64/python3.6/site-packages/numpy/__pycache__/
Upload File :
Current File : //usr/local/lib64/python3.6/site-packages/numpy/__pycache__/conftest.cpython-36.pyc
3

���hH�@s�dZddlZddlZddlZddlZddlZddlmZdaiZ	ej
jejj
ej�d��ejjdddd�yejjd�Wn$ejjk
r�ejjd�YnXd	d
�Zdd�Zd
d�Zej�dd��Zejddd�dd��Zejdd�dd��ZdS)z=
Pytest configuration and fixtures for the Numpy test suite.
�N)�get_fpu_modez.hypothesisz
numpy-profileT)�name�deadlineZ
print_blobznp.test() profilecCs4|jdd�|jdd�|jdd�|jdd�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�//tmp/pip-build-5_djhm0z/numpy/numpy/conftest.py�pytest_configure$sr	cCs|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)�parserrrr�pytest_addoption/s
rcCs"|jjd�}|dk	r|tjd<dS)NZavailable_memoryZNPY_AVAILABLE_MEM)rZ	getoption�os�environ)�sessionZ
available_memrrr�pytest_sessionstart9srcCs0t�}tdkr|an|tkr,t|ft|<|adS)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)�item�moderrr�pytest_itemcollected@sr�function)Zscope�autouseccsZt�}dVt�}||kr*tdj||���tj|j�}|dk	rV|\}}tdj||���dS)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)r�AssertionError�formatr�get�node)�requestZold_modeZnew_modeZcollect_resultrrr�check_fpu_modeTs
r )rcCst|d<dS)N�np)�numpy)Zdoctest_namespacerrr�add_npisr#)�__doc__r�tempfileZ
hypothesisZpytestr"Znumpy.core._multiarray_testsrrrZ
configurationZset_hypothesis_home_dir�path�join�
gettempdir�settingsZregister_profileZload_profile�errorsZInvalidArgumentr	rrZhookimplrZfixturer r#rrrr�<module>s,