ó
Ë½÷Xc           @` s‰   d  Z  d d l m Z m Z m Z d d l m Z m Z d d l	 m
 Z
 m Z d d l m Z e e e ƒ d ƒ Z d „  Z d „  Z d	 S(
   s€    Test reading of files not conforming to matlab specification

We try and read any file that matlab reads, these files included
i    (   t   divisiont   print_functiont   absolute_import(   t   dirnamet   join(   t   assert_t   assert_raises(   t   loadmatt   datac          C` sQ   t  t d ƒ }  t |  ƒ } | d j j } t t d d d g ƒ j | ƒ ƒ d  S(   Ns   nasty_duplicate_fieldnames.matt   Summaryt   _1_Station_Qt   _2_Station_Qt   _3_Station_Q(   t   pjoint   TEST_DATA_PATHR   t   dtypet   namesR   t   sett   issubset(   t   multi_fnamet   varst   funny_names(    (    sF   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/tests/test_pathological.pyt   test_multiple_fieldnames   s
    c          C` s;   t  t d ƒ }  t |  d ƒ  } t t t | ƒ Wd  QXd  S(   Ns   malformed1.matt   rb(   R   R   t   openR   t
   ValueErrorR   (   t   fnamet   f(    (    sF   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/tests/test_pathological.pyt   test_malformed1   s    N(   t   __doc__t
   __future__R    R   R   t   os.pathR   R   R   t   numpy.testingR   R   t   scipy.io.matlab.mioR   t   __file__R   R   R   (    (    (    sF   /tmp/pip-build-7oUkmx/scipy/scipy/io/matlab/tests/test_pathological.pyt   <module>   s   	
