
    rbi%                         d Z ddlmZ ddlZddlZej                             eej	        d           d          Z
 G d d          ZdS )	z"
Check the numpy config is valid.
    )patchN_built_with_mesonzRequires Meson buildsreasonc                       e Zd Zg dZ ed          ej                            d          d                         Zd Z	d Z
d Zd	S )
TestNumPyConfigs)	CompilerszMachine InformationzPython Informationznumpy.__config__._check_pyyamlz(unittest.mock.patch updates global stater   c                     t                      |_        t          j        t                    5  t          j                     d d d            d S # 1 swxY w Y   d S N)ModuleNotFoundErrorside_effectpytestwarnsUserWarningnpshow_config)selfmock_yaml_importers     m/var/www/html/mdtn/previsions/meteo_cartes/venv/lib/python3.11/site-packages/numpy/tests/test_numpy_config.pytest_pyyaml_not_foundz&TestNumPyConfigs.test_pyyaml_not_found   s     *=)>)>&\+&& 	 	N	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 	s   AAAc                     t          j        d          t          t                    sJ t	          fd| j        D                       s
J d            d S )Ndictsmodec              3       K   | ]}|v V  	d S r    ).0keyconfigs     r   	<genexpr>z2TestNumPyConfigs.test_dict_mode.<locals>.<genexpr>"   s'      FFS3&=FFFFFF    zFRequired key missing, see index of `False` with `REQUIRED_CONFIG_KEYS`)r   r   
isinstancedictallREQUIRED_CONFIG_KEYS)r   r   s    @r   test_dict_modezTestNumPyConfigs.test_dict_mode   sw    W---&$'''''FFFFD,EFFFFF 	
 	
@	
 	
 	
 	
 	
r!   c                     t          j        t                    5  t          j        d           d d d            d S # 1 swxY w Y   d S )Nfoor   )r   raisesAttributeErrorr   r   r   s    r   test_invalid_modez"TestNumPyConfigs.test_invalid_mode'   s    ]>** 	' 	'N&&&&	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	' 	's   =AAc                 ^    t          t          j        j                  dk    s
J d            d S )N   zGNew mode detected, please add UT if applicable and increment this count)lenr   
__config__DisplayModesr+   s    r   test_warn_to_add_testsz'TestNumPyConfigs.test_warn_to_add_tests+   s4    2=-..!333D 43333r!   N)__name__
__module____qualname__r%   r   r   markthread_unsafer   r&   r,   r2   r   r!   r   r   r      s           U+,,[&PQQ  RQ -,

 
 
' ' '
 
 
 
 
r!   r   )__doc__unittest.mockr   r   numpyr   r6   skipifhasattrr0   
pytestmarkr   r   r!   r   <module>r>      s                [2333"    

 
 
 
 
 
 
 
 
 
r!   