HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/numpy/tests/__pycache__/test_numpy_config.cpython-310.pyc
o

���g��@sPdZddlZddlZddlmZmZejje	ej
d�dd�ZGdd�d�ZdS)	z"
Check the numpy config is valid.
�N)�Mock�patch�_built_with_mesonzRequires Meson builds)�reasonc@s<eZdZgd�Zed�dd��Zdd�Zdd�Zd	d
�ZdS)�TestNumPyConfigs)�	CompilerszMachine InformationzPython Informationznumpy.__config__._check_pyyamlcCs@t�|_t�t��
t��Wd�dS1swYdS)N)�ModuleNotFoundError�side_effect�pytest�warns�UserWarning�np�show_config)�self�mock_yaml_importer�r�H/usr/local/lib/python3.10/dist-packages/numpy/tests/test_numpy_config.py�test_pyyaml_not_founds
"�z&TestNumPyConfigs.test_pyyaml_not_foundcs>tjdd��t�t�s
J�t�fdd�|jD��sJd��dS)N�dicts��modecsg|]}|�v�qSrr)�.0�key��configrr�
<listcomp>sz3TestNumPyConfigs.test_dict_mode.<locals>.<listcomp>zFRequired key missing, see index of `False` with `REQUIRED_CONFIG_KEYS`)r
r�
isinstance�dict�all�REQUIRED_CONFIG_KEYS�rrrr�test_dict_modes
�zTestNumPyConfigs.test_dict_modecCs<t�t��tjdd�Wd�dS1swYdS)N�foor)r
�raises�AttributeErrorr
rr rrr�test_invalid_mode$s"�z"TestNumPyConfigs.test_invalid_modecCsttjj�dksJd��dS)N�zGNew mode detected, please add UT if applicable and increment this count)�lenr
�
__config__�DisplayModesr rrr�test_warn_to_add_tests(s�z'TestNumPyConfigs.test_warn_to_add_testsN)	�__name__�
__module__�__qualname__rrrr!r%r*rrrrrs
	r)
�__doc__�numpyr
r
�
unittest.mockrr�mark�skipif�hasattrr(�
pytestmarkrrrrr�<module>s�