σ
ίΘ[c        	   @` s±   d  d l  m Z m Z m Z m Z d  d l Z d  d l Z d d l m	 Z	 d   Z
 d   Z d   Z d   Z e j j d	 d
 d d d
 d d g d g  d    Z d   Z d S(   i    (   t   absolute_importt   divisiont   print_functiont   unicode_literalsNi   (   t   FlagCollectionc           C` s   t  d d  d  S(   Nt   shapei   i   i   (   i   i   i   (   R   (    (    (    sH   lib/python2.7/site-packages/astropy/nddata/tests/test_flag_collection.pyt	   test_init   s    c          C` s?   t  j t   }  t   Wd  QX|  j j d d k s; t  d  S(   Ni    u?   FlagCollection should be initialized with the shape of the data(   t   pytestt   raisest	   ExceptionR   t   valuet   argst   AssertionError(   t   exc(    (    sH   lib/python2.7/site-packages/astropy/nddata/tests/test_flag_collection.pyt   test_init_noshape   s    c          C` sE   t  j t   }  t d d  Wd  QX|  j j d d k sA t  d  S(   NR   g      π?i    u1   FlagCollection shape should be an iterable object(   R   R   R	   R   R
   R   R   (   R   (    (    sH   lib/python2.7/site-packages/astropy/nddata/tests/test_flag_collection.pyt   test_init_notiterable   s    c          C` s   t  d d	  }  t j d
  j t  |  d <t j d  j t  |  d <t j d  j t  |  d <t j d  j t  |  d <d  S(   NR   i   i   i   u   au   bu   cu   d(   i   i   i   (   i   i   i   (   i   i   i   (   i   i   i   (   i   i   i   (   R   t   npt   onest   astypet   floatt   intt   boolt   str(   t   f(    (    sH   lib/python2.7/site-packages/astropy/nddata/tests/test_flag_collection.pyt   test_setitem    s
    u   valuei   g      π?u   spami   g       @g      @c         C` sQ   t  d d  } t j t   } |  | d <Wd  QX| j j d d k sM t  d  S(	   NR   i   i   i   u   ai    u&   flags should be given as a Numpy array(   i   i   i   (   R   R   R   R	   R
   R   R   (   R
   R   R   (    (    sH   lib/python2.7/site-packages/astropy/nddata/tests/test_flag_collection.pyt   test_setitem_invalid_type(   s    c          C` s|   t  d d	  }  t j t   } t j d
  |  d <Wd  QX| j j d j d  sY t	  | j j d j
 d  sx t	  d  S(   NR   i   i   i   u   ai    u   flags array shapeu#   does not match data shape (1, 2, 3)(   i   i   i   (   i   i   i   (   R   R   R   t
   ValueErrorR   R   R
   R   t
   startswithR   t   endswith(   R   R   (    (    sH   lib/python2.7/site-packages/astropy/nddata/tests/test_flag_collection.pyt   test_setitem_invalid_shape0   s
    (   g      π?g       @g      @(   t
   __future__R    R   R   R   R   t   numpyR   t    R   R   R   R   R   t   markt   parametrizeR   R   (    (    (    sH   lib/python2.7/site-packages/astropy/nddata/tests/test_flag_collection.pyt   <module>   s   "				6