[Scipy-svn] r6865 - in trunk/scipy/io/matlab/tests: . data
scipy-svn at scipy.org
scipy-svn at scipy.org
Thu Nov 11 19:56:29 EST 2010
Author: matthew.brett at 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@ àjO@ à¾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¿ âÇ¿ @«>¿ @U¿ ÐD¨¿ ÀPk? àò? À):? @*©S? ðF? àMbp? @*©c? @*©3¿ ÀtX? @*©C? àMb¿ {? àQ¸~¿ Ý¿ Àtx? äò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