[Scipy-svn] r2595 - in trunk/Lib/odr: . tests

scipy-svn at scipy.org scipy-svn at scipy.org
Tue Jan 23 13:45:36 CST 2007


Author: jarrod.millman
Date: 2007-01-23 13:45:34 -0600 (Tue, 23 Jan 2007)
New Revision: 2595

Modified:
   trunk/Lib/odr/__init__.py
   trunk/Lib/odr/tests/test_odrpack.py
Log:
starting to enable odr tests using NumpyTest


Modified: trunk/Lib/odr/__init__.py
===================================================================
--- trunk/Lib/odr/__init__.py	2007-01-23 19:33:57 UTC (rev 2594)
+++ trunk/Lib/odr/__init__.py	2007-01-23 19:45:34 UTC (rev 2595)
@@ -59,4 +59,6 @@
 __all__ = ['odr', 'odr_error', 'odr_stop', 'Data', 'RealData', 'Model',
            'Output', 'ODR', 'odrpack']
 
+from numpy.testing import NumpyTest
+test = NumpyTest().test
 #### EOF #######################################################################

Modified: trunk/Lib/odr/tests/test_odrpack.py
===================================================================
--- trunk/Lib/odr/tests/test_odrpack.py	2007-01-23 19:33:57 UTC (rev 2594)
+++ trunk/Lib/odr/tests/test_odrpack.py	2007-01-23 19:45:34 UTC (rev 2595)
@@ -1,16 +1,15 @@
 
 # Standard library imports.
 import cPickle
-import unittest
 
 # Scipy imports.
 import numpy as np
 from numpy import pi
-from numpy.testing import assert_array_almost_equal
+from numpy.testing import NumpyTest, NumpyTestCase, assert_array_almost_equal
 from scipy.odr import Data, Model, ODR, RealData, odr_stop
 
 
-class ODRTestCase(unittest.TestCase):
+class test_odr(NumpyTestCase):
 
     # Explicit Example
 
@@ -312,7 +311,7 @@
         )
 
 
-if __name__ == '__main__':
-    unittest.main()
+if __name__ == "__main__":
+    NumpyTest().run()
 
 #### EOF #######################################################################



More information about the Scipy-svn mailing list