a
    ߙfbr                     @   s<   d Z ddlZddlmZmZ ddlmZ dd Zdd Z	dS )	zRegression tests for deprecated units or those that are "soft" deprecated
because they are required for VOUnit support but are not in common use.    N)
deprecatedrequired_by_vounit)unitsc                  C   s&  t t tj W d    n1 s&0    Y  tjtjddksHJ t ( tj	 d tjksjJ W d    n1 s~0    Y  tj	 d tjksJ dD ]|} dD ]r}dD ]h}| | }|| }t t t
t| W d    n1 s0    Y  t
t|jjd t
t|ksJ qqqd S )N   r   )ZearthZjupiter)ZMassZRad)ny)pytestraisesAttributeErroruZemuZBitor   enableZcomposegetattrZ
representsbases)bodyZphystypeprefixZnamewoprefixZunitname r   Blib/python3.9/site-packages/astropy/units/tests/test_deprecated.pytest_emu   s     $
6(r   c                   C   s   t t" tj tj tj W d    n1 s20    Y  tdtjksPJ tdtjksdJ tdtjksxJ tjtj	
 vsJ tjtj
 vsJ tjtj
 vsJ d S )NnsolMassnsolRadnsolLum)r   r	   r
   r   r   r   r   ZUnitr   ZsolMassZfind_equivalent_unitsZsolRadZsolLumr   r   r   r   test_required_by_vounit(   s    $r   )
__doc__r   Zastropy.unitsr   r   Zastropyr   r   r   r   r   r   r   r   <module>   s
   