U
    e»{jf  ã                   @   s<   d Z ddlZddlmZ ddlmZmZ dd„ Zdd„ Z	dS )	z‘Regression tests for deprecated units or those that are "soft" deprecated
because they are required for VOUnit support but are not in common use.é    N)Úunits)Ú
deprecatedÚrequired_by_vounitc                  C   sê   t  t¡� tj W 5 Q R X tj tjd¡dks4t‚t 	¡ � tj 
¡ d tjksVt‚W 5 Q R X tj 
¡ d tjksxt‚dD ]h} dD ]^}dD ]T}| | }|| }t  t¡� tt|ƒ W 5 Q R X tt|ƒjjd tt|ƒksŒt‚qŒq„q|d S )Né   r   )ÚearthZjupiter)ZMassZRad)ÚnÚy)ÚpytestÚraisesÚAttributeErrorÚuZemuZBiÚtor   ÚAssertionErrorÚenableZcomposeÚgetattrZ
representsÚbases)ÚbodyZphystypeÚprefixZnamewoprefixZunitname© r   úb/var/www/html/bwave/python/venv/lib/python3.8/site-packages/astropy/units/tests/test_deprecated.pyÚtest_emu   s"    
" ÿr   c                	   C   s¤   t  t¡� tj tj tj W 5 Q R X t d¡tjks<t	‚t d¡tjksPt	‚t d¡tjksdt	‚tjtj
 ¡ ksxt	‚tjtj ¡ ksŒt	‚tjtj ¡ ks t	‚d S )NÚnsolMassÚnsolRadÚnsolLum)r	   r
   r   r   r   r   r   ZUnitr   r   ZsolMassZfind_equivalent_unitsZsolRadZsolLumr   r   r   r   Útest_required_by_vounit(   s    r   )
Ú__doc__r	   Zastropyr   r   Zastropy.unitsr   r   r   r   r   r   r   r   Ú<module>   s
   