U
    e»{jž  ã                   @   sP   d dl mZ d dlZd dlZd dlmZmZ dd„ Zej	 
dej¡dd„ ƒZdS )	é    )ÚMappingProxyTypeN)Ú
parametersÚrealizationsc                  C   s:   t tƒ} t| ƒttjƒkst‚tjD ]}|| ks$t‚q$dS )zLTest the realizations are in ``dir`` of :mod:`astropy.cosmology.parameters`.N)Údirr   ÚsetÚ__all__ÚAssertionErrorÚ	available)ÚdÚn© r   úf/var/www/html/bwave/python/venv/lib/python3.8/site-packages/astropy/cosmology/tests/test_parameters.pyÚtest_realizations_in_dir   s    
r   Únamec                 C   sº   t t| ƒ}t|tƒst‚|d | ks(t‚t t| ƒ}|d |jksDt‚|d |jjksXt‚|j	D ]}t
 || t ||ƒ¡s^t‚q^t|j ¡ ƒ | ¡ ¡sšt‚|jdddd�}||ks¶t‚dS )zb
    Test getting 'parameters' and that it is derived from the corresponding
    realization.
    r   Z	cosmologyÚmappingT)Zcosmology_as_strZmove_from_metaN)Úgetattrr   Ú
isinstancer   r   r   r   Ú	__class__Ú__qualname__Ú__parameters__ÚnpZarray_equalr   ÚmetaÚkeysÚissubsetZ	to_format)r   ÚparamsZcosmor   Úmr   r   r   Útest_getting_parameters   s    


r   )Útypesr   Únumpyr   ZpytestZastropy.cosmologyr   r   r   ÚmarkZparametrizer	   r   r   r   r   r   Ú<module>   s   	