[Scipy-svn] r2853 - trunk/Lib/sparse/tests

scipy-svn at scipy.org scipy-svn at scipy.org
Tue Mar 20 13:34:55 EDT 2007


Author: cookedm
Date: 2007-03-20 12:34:52 -0500 (Tue, 20 Mar 2007)
New Revision: 2853

Modified:
   trunk/Lib/sparse/tests/test_sparse.py
Log:
Replace 2.4ism sorted


Modified: trunk/Lib/sparse/tests/test_sparse.py
===================================================================
--- trunk/Lib/sparse/tests/test_sparse.py	2007-03-20 14:44:08 UTC (rev 2852)
+++ trunk/Lib/sparse/tests/test_sparse.py	2007-03-20 17:34:52 UTC (rev 2853)
@@ -800,7 +800,9 @@
         coo = coo_matrix((data,(row,col)),(4,3))
 
         ndata,nrow,ncol = coo._normalize(rowfirst=True)
-        assert(zip(nrow,ncol,ndata) == sorted(zip(row,col,data))) #should sort by rows, then cols
+        sorted_rcd = zip(row, col, data)
+        sorted_rcd.sort()
+        assert(zip(nrow,ncol,ndata) == sorted_rcd) #should sort by rows, then cols
         assert_array_equal(coo.data, data)                        #coo.data has not changed
         assert_array_equal(coo.row, row)                          #coo.row has not changed
         assert_array_equal(coo.col, col)                          #coo.col has not changed




More information about the Scipy-svn mailing list