σ
ίΘ[c           @` sΫ   d  Z  d d l m Z m Z m Z m Z d d l m Z d d l m	 Z	 d d l
 m Z d d l m Z d   Z d	   Z d
   Z d   Z d   Z d   Z d   Z d   Z d   Z e e  d    Z d   Z d S(   uE   
Regression tests for the physical_type support in the units package
i    (   t   absolute_importt   unicode_literalst   divisiont   print_functioni   (   t   units(   t   physical(   t   hbar(   t   raisesc           C` s   t  j j d k s t  d  S(   Nu   length(   t   ut   mt   physical_typet   AssertionError(    (    (    s@   lib/python2.7/site-packages/astropy/units/tests/test_physical.pyt   test_simple   s    c           C` s    t  j d j d k s t  d  S(   Ni   u   volume(   R   t   cmR
   R   (    (    (    s@   lib/python2.7/site-packages/astropy/units/tests/test_physical.pyt
   test_power   s    c           C` s#   t  j t  j j d k s t  d  S(   Nu   speed(   R   t   kmt   hR
   R   (    (    (    s@   lib/python2.7/site-packages/astropy/units/tests/test_physical.pyt
   test_speed   s    c           C` s#   t  j t  j j d k s t  d  S(   Nu   unknown(   R   R	   t   sR
   R   (    (    (    s@   lib/python2.7/site-packages/astropy/units/tests/test_physical.pyt   test_unknown   s    c           C` s#   t  j t  j j d k s t  d  S(   Nu   dimensionless(   R   R	   R
   R   (    (    (    s@   lib/python2.7/site-packages/astropy/units/tests/test_physical.pyt   test_dimensionless#   s    c           C` s   t  j j d k s t  d  S(   Nu   angular momentum(   R   t   unitR
   R   (    (    (    s@   lib/python2.7/site-packages/astropy/units/tests/test_physical.pyt   test_angular_momentum'   s    c          C` s;   t  j t  j d t  j t  j }  |  j d k s7 t  d  S(   Ni   u   spectral flux density wav(   R   t   ergR   R   t   AAR
   R   (   t   flam(    (    s@   lib/python2.7/site-packages/astropy/units/tests/test_physical.pyt	   test_flam+   s    "c          C` s;   t  j t  j d t  j t  j }  |  j d k s7 t  d  S(   Ni   u   photon flux density wav(   R   t   photonR   R   R   R
   R   (   t   photlam(    (    s@   lib/python2.7/site-packages/astropy/units/tests/test_physical.pyt   test_photlam0   s    "c          C` s;   t  j t  j d t  j t  j }  |  j d k s7 t  d  S(   Ni   u   photon flux density(   R   R   R   R   t   HzR
   R   (   t   photnu(    (    s@   lib/python2.7/site-packages/astropy/units/tests/test_physical.pyt   test_photnu5   s    "c           C` s   t  j t j d  d  S(   Nu   utter craziness(   R   t   def_physical_typeR   R	   (    (    (    s@   lib/python2.7/site-packages/astropy/units/tests/test_physical.pyt   test_redundant_physical_type:   s    c           C` s4   t  j j d k s t  t  j j d k s0 t  d  S(   Nu   data quantity(   R   t   byteR
   R   t   bit(    (    (    s@   lib/python2.7/site-packages/astropy/units/tests/test_physical.pyt   test_data_quantity?   s    N(   t   __doc__t
   __future__R    R   R   R   t    R   R   R   t	   constantsR   t   tests.helperR   R   R   R   R   R   R   R   R   R    t
   ValueErrorR"   R%   (    (    (    s@   lib/python2.7/site-packages/astropy/units/tests/test_physical.pyt   <module>   s    "									