
\c           @@  s^   d  Z  d d l m Z d d l Z d d l Z d d l m Z m Z d e f d     YZ d S(   s!   
    Tests the h5py.File object.
i    (   t   absolute_importNi   (   t   utt   TestCaset   TestErrorPrintingc           B@  s    e  Z d  Z d   Z d   Z RS(   sC   
        Verify the error printing is squashed in all threads.
    c         @  sE   d d l  }   f d   } | j d |  } | j   | j   d S(   s;    No console messages should be shown from membership tests i    Nc       	   @  sJ   t  j   j   d  , }  y |  d j } Wn t k
 r? n XWd  QXd  S(   Nt   wt   doesnt_exist(   t   h5pyt   Filet   mktempt   valuet   KeyError(   t   newfileR   (   t   self(    s9   lib/python2.7/site-packages/h5py/tests/hl/test_threads.pyt   test$   s
    t   target(   t	   threadingt   Threadt   startt   join(   R   R   R   t   th(    (   R   s9   lib/python2.7/site-packages/h5py/tests/hl/test_threads.pyt   test_printing   s
    
c         @  s9     f d   } t  j d |  } | j   | j   d S(   sA    No console messages should be shown for non-existing attributes c       	   @  sa   t  j   j   d  C }  d d d g |  d <y |  d j d } Wn t k
 rV n XWd  QXd  S(   NR   i   i   i   t   newdatat   nonexistent_attr(   R   R   R   t   attrsR
   (   R   R   (   R   (    s9   lib/python2.7/site-packages/h5py/tests/hl/test_threads.pyR   2   s    R   N(   R   R   R   R   (   R   R   R   (    (   R   s9   lib/python2.7/site-packages/h5py/tests/hl/test_threads.pyt   test_attr_printing/   s    	
(   t   __name__t
   __module__t   __doc__R   R   (    (    (    s9   lib/python2.7/site-packages/h5py/tests/hl/test_threads.pyR      s   	(	   R   t
   __future__R    R   R   t   commonR   R   R   (    (    (    s9   lib/python2.7/site-packages/h5py/tests/hl/test_threads.pyt   <module>   s
   