[Numpy-svn] r5825 - branches/1.1.x/numpy/lib/tests

numpy-svn@scip... numpy-svn@scip...
Mon Sep 15 04:57:28 CDT 2008


Author: stefan
Date: 2008-09-15 04:57:10 -0500 (Mon, 15 Sep 2008)
New Revision: 5825

Modified:
   branches/1.1.x/numpy/lib/tests/test_io.py
Log:
Fix test failure (closes #821).


Modified: branches/1.1.x/numpy/lib/tests/test_io.py
===================================================================
--- branches/1.1.x/numpy/lib/tests/test_io.py	2008-09-13 21:17:09 UTC (rev 5824)
+++ branches/1.1.x/numpy/lib/tests/test_io.py	2008-09-15 09:57:10 UTC (rev 5825)
@@ -164,7 +164,12 @@
 
     def test_empty_file(self):
         c = StringIO.StringIO()
-        assert_raises(IOError, np.loadtxt, c)
+        try:
+            np.loadtxt(c)
+        except IOError:
+            return
+        else:
+            raise RuntimeError("Empty file should raise IOError.")
 
 class Testfromregex(NumpyTestCase):
     def test_record(self):



More information about the Numpy-svn mailing list