[Scipy-svn] r6865 - in trunk/scipy/io/matlab/tests: . data

scipy-svn@scip... scipy-svn@scip...
Thu Nov 11 18:56:29 CST 2010


Author: matthew.brett@gmail.com
Date: 2010-11-11 18:56:28 -0600 (Thu, 11 Nov 2010)
New Revision: 6865

Added:
   trunk/scipy/io/matlab/tests/data/nasty_duplicate_fieldnames.mat
   trunk/scipy/io/matlab/tests/test_pathological.py
Log:
TEST - failing test for duplicate fieldnames

Added: trunk/scipy/io/matlab/tests/data/nasty_duplicate_fieldnames.mat
===================================================================
--- trunk/scipy/io/matlab/tests/data/nasty_duplicate_fieldnames.mat	                        (rev 0)
+++ trunk/scipy/io/matlab/tests/data/nasty_duplicate_fieldnames.mat	2010-11-12 00:56:28 UTC (rev 6865)
@@ -0,0 +1,9 @@
+MATLAB 5.0 MAT-file, Platform: PCWIN, Created on: Mon Oct 04 09:42:29 2010                                                   IM   `                                 Summary           Top_Q           Middle_Q        Bottom_Q        Left_Q          Right_Q         Total_Q         Depth           Cells           Track           Mean_Vel        Boat_Vel        Station_Q       Station_Q       Station_Q       Station_Q       Track_Reference Units              @                     "             	                                                                                                                                                                                                                                                                                        @                     "             	                                                                                                                                                                                                                                                                                        @                     "             	                                                                                                                                                                                                                                                                                        @                     "             	                                                                                                                                                                                                                                                                                        @                     "             	                                                                                                                                                                                                                                                                                        @                     "             	                                                                                                                                                                                                                                                                                        @                     "             	         ™™å?   €j¼ä?    Zdã?   €çûá?    á?   @—â?   à$å?   @Ý$ê?   Àïï?   @´Èô?   Àõ(ú?   @5^ @   `@    A`@   ÀÆK@   @^º	@   ÀZ@   ÀZ@    Ù@   @‡
+@   `b
+@   à÷S@   €ƒ@   `7‰@    ®G
+@   ÀGá@    ü©@   €¼t@    X9@   @‡@    —n@    -²@   `ã¥@    @   @                     "             	           @       @       @      ð?      ð?       @       @      @      @       @      &@      .@      2@      4@      7@      9@      ;@      <@      =@      =@      =@      <@      <@      ;@      :@      6@      5@      5@      5@      5@      6@      6@      6@      6@   P                     "             	         `¼tû?    /Ý@    l@    …k@    ®#@    V'@    X¹+@   Àþ0@    C\2@    ´Ø4@    ëR7@   `É´9@   À8<@   @f–>@    s‡@@    ×»A@   `³òB@   `(D@    Ë`E@    šF@   ÀfÅG@   ÀvîH@    ’J@   `Å.K@    çLL@   àcM@   À}uN@   àjƒO@   à¾FP@   àÀÉP@    øFQ@   À"ÃQ@   @[=R@   À=½R@   `ÚÄ¿   ÀÏÕÒ¿   @&SÙ¿   `‡Ù¿    ‰ÒÚ¿   ÀN@á¿   €vOè¿   À@‚ð¿   À%äõ¿   €Diü¿   àh À    
+À   €ŒùÀ   À‘À    ¦ùÀ   `=j À    'o#À    ã´&À   Àx	*À    ë¢-À   €!ž0À    Eg2À    04À   €Ö6À   `…Ê7À    ÿ‘9À   @x;À   @Jj=À    Šn?À    ½@À    µÌAÀ   `ãBÀ   €‹ûCÀ    ‰	EÀ   P                     "             	         @à0ã?   `iYã?    PÃä?   @‰‰è?    Þ,å?   àq&ä?   @œÃà?    w§á?   `«ñÛ?   €á¡Ü?   €$Õ?   `
+Ò?   à§-Ø?   àÄØ?   €×?   @X©Ö?   À&©Ü?   @¨à?    ½vÜ?   `¿9à?   `ØüÛ?    oÓÚ?    .¦Ù?   àb—Ú?   `Ä©Ý?   `ÂÝ?   €p‡Ú?   À¸—Ý?    i¯à?   àmß?    SèÙ?    ·AÜ?   €¼"Ù?   à8Þ?   `uŒÕ¿    ¶-Ö¿   àúAÙ¿   @_iÑ¿   €O÷׿   àÎôÛ¿   €ß4Ë¿   `(±Ê¿   @
+:Ô¿   @(”Ç¿   @k€Ì¿   €(Ò¿    ”ØÍ¿   `ôZÚ¿   À‰Ó¿    “ÛÓ¿   @…tÑ¿   @O
+Þ¿   @šqÜ¿    ÍÑÝ¿   `ÉØ¿   À`oÜ¿    GéÕ¿   À*ÈÙ¿    1NÝ¿   @oÙ¿   `zÝ¿   @QÞ¿   `×YÚ¿    ‚qÙ¿   àµRÙ¿   €ù›Ú¿   `VœÜ¿   àøÝ¿   p                     "             	   @     `¼tû¿   À¡Eü¿   €Âõý¿   Àóýÿ¿    ®GÀ    X9À   àOÀ   à•²À   @#JÀ   `ˆãÀ    ·ÑÀ   @óÀ   @{À   Àk	À   `þÃÀ    ?FÀ   àÅmÀ    ÏUÀ   €¬‹À    •À   @¢´À    ÿÀ    ½AÀ    ,ÃÀ   `âÀ   àMbÀ   à'À   €ÒÞ À   €-¡ À   €A` À    ÓMÿ¿   @¦
+ÿ¿    !Žþ¿     øÿ¿   `ÚÄ?    ŏÁ?   ÀYõ¹?   `vOn¿   @À›?   àQ¸¾?   àž<Ì?    jÑ?   à“‡Õ?   àzÚ?    /ã?    ¤Nì?   à|ï?   @5^ò?    3¢õ?   ÀPk÷?   `R'ø?    à-ú?   À¨¤ú?   @’Ëü?   €ÀÊü?    :’ü?   àOü?    ÆKý?   `îZü?   `šwü?    åaþ?   àÐ"ÿ?    ÿ! @   à‘\ @   `xú @   à+e@    1ˆ@    Øß @   àMb ¿   €sF¤¿    X9¤¿    uª¿   àšæ¿    ,CŒ¿    âX—¿    d̝¿   @io ¿    HP¬¿   @NÑ‘¿    +‡v?   €ò°°¿   à6°¿   €—n‚?   @¬œ¿   €-!_¿   €uq{¿   àâ6š¿   À„¿   `t$—?   à4?    ½Á‡¿   àQ¸~?    s—¿   €uq‹¿   €âLj¿   @«>—¿   @›U¿    ÐD¨¿   ÀPkŠ?   àò’?   À):’?   @*©S?   €ðF?   àMbp?   @*©c?   @*©3¿   Àt“X?   @*©C?   àMb€¿    š{?   àQ¸~¿    ˜Ýƒ¿   Àt“x?   €äòo¿    N@ƒ?    ¼R?    QÚk?   `˜L…¿    ¼‚¿    *…?   àMb€¿    ¼b?   àâ6Z¿    ¼‚¿   `vO~¿   Àóý”?   àâ6z?    ¼R?   @ázd?   @¿}m¿   @ázd?   àâ6Z?   @*©ƒ?   à+ei?   àâ6z?   €O†?   @                     "             	                                                                                                                                                                                                                                                                                        @                     "             	                                                                                                                                                                                                                                                                                        @                     "             	                                                                                                                                                                                                                                                                                        @                     "             	                                                                                                                                                                                                                                                                                        @                     "             	           ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?      ð?   8                                          Ð   Top_Q           Middle_Q        Bottom_Q        Left_Q          Right_Q         Total_Q         Depth           Cells           Track           Mean_Vel        Boat_Vel        Station_Q       Track_Reference    8                                         m 3 / s    8                                         m 3 / s    8                                         m 3 / s    8                                         m 3 / s    8                                         m 3 / s    8                                         m 3 / s    8                                         m          0                                             8                                         m          8                                         m / s      8                                         m / s      8                                         m 3 / s    0                                          
\ No newline at end of file

Added: trunk/scipy/io/matlab/tests/test_pathological.py
===================================================================
--- trunk/scipy/io/matlab/tests/test_pathological.py	                        (rev 0)
+++ trunk/scipy/io/matlab/tests/test_pathological.py	2010-11-12 00:56:28 UTC (rev 6865)
@@ -0,0 +1,31 @@
+""" Test reading of files not conforming to matlab specification
+
+We try and read any file that matlab reads, these files included
+"""
+from os.path import dirname, join as pjoin
+import sys
+
+if sys.version_info[0] >= 3:
+    from io import BytesIO
+    cStringIO = BytesIO
+else:
+    from cStringIO import StringIO as cStringIO
+    from StringIO import StringIO as BytesIO
+
+import numpy as np
+
+from nose.tools import assert_true, assert_false, \
+     assert_equal, assert_raises
+
+from numpy.testing import assert_array_equal, assert_array_almost_equal, \
+     run_module_suite
+
+from scipy.io.matlab.mio import loadmat
+
+TEST_DATA_PATH = pjoin(dirname(__file__), 'data')
+
+def test_multiple_fieldnames():
+    # Example provided by Dharhas Pothina
+    # Extracted using mio5.varmats_from_mat
+    multi_fname = pjoin(TEST_DATA_PATH, 'nasty_duplicate_fieldnames.mat')
+    vars = loadmat(multi_fname)



More information about the Scipy-svn mailing list