Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

TST Remove python unittest boilerplate...

...since nose is used
  • Loading branch information...
commit 67cc43be2c06161a3568cddf039d4b57935d9b1f 1 parent 919e15e
kwgoodman authored March 19, 2013
4  README.rst
Source Rendered
@@ -122,9 +122,9 @@ After you have installed ``la``, run the suite of unit tests::
122 122
     >>> import la
123 123
     >>> la.test()
124 124
     <snip>
125  
-    Ran 2997 tests in 9.225s
  125
+    Ran 2996 tests in 9.225s
126 126
     OK
127  
-    <nose.result.TextTestResult run=2997 errors=0 failures=0>
  127
+    <nose.result.TextTestResult run=2996 errors=0 failures=0>
128 128
     
129 129
 The ``la`` package contains C extensions that speed up common alignment
130 130
 operations such as adding two unaligned larrys. If the C extensions don't
23  la/tests/deflarry_test.py
@@ -3529,29 +3529,6 @@ def test_vacuum8(self):
3529 3529
         assert_almost_equal(larv.x, larr.x)
3530 3530
         assert_(larv.label == larr.label)
3531 3531
  
3532  
-           
3533  
-def suite():
3534  
-    s = []
3535  
-    u = unittest.TestLoader().loadTestsFromTestCase
3536  
-    s.append(u(Test_init))
3537  
-    s.append(u(Test_unary))
3538  
-    s.append(u(Test_binary))
3539  
-    s.append(u(Test_reduce))
3540  
-    s.append(u(Test_comparison)) 
3541  
-    s.append(u(Test_anyall))
3542  
-    s.append(u(Test_getset))
3543  
-    s.append(u(Test_label))
3544  
-    s.append(u(Test_calc))
3545  
-    s.append(u(Test_alignment))
3546  
-    s.append(u(Test_properties_01))      
3547  
-    return unittest.TestSuite(s)
3548  
-
3549  
-def run():
3550  
-    unittest.TextTestRunner(verbosity=2).run(suite())
3551  
-    
3552  
-if __name__ == '__main__':
3553  
-    run()   
3554  
-
3555 3532
 # take test -----------------------------------------------------------------
3556 3533
 
3557 3534
 # Make sure larry.take gives the same result as larry.__getitem__.
13  la/tests/io_test.py
@@ -95,19 +95,6 @@ def test_io_6(self):
95 95
         actual = io['desired'][:]
96 96
         assert_larry_equal(actual, desired)
97 97
         
98  
-def testsuite():
99  
-    s = []
100  
-    u = unittest.TestLoader().loadTestsFromTestCase
101  
-    s.append(u(Test_io))
102  
-    return unittest.TestSuite(s)
103  
-
104  
-def run():   
105  
-    suite = testsuite()
106  
-    unittest.TextTestRunner(verbosity=2).run(suite)
107  
-    
108  
-if __name__ == '__main__':
109  
-    run()           
110  
-        
111 98
 # nose tests ----------------------------------------------------------------
112 99
 
113 100
 def datetime_test():
16  la/tests/missing_test.py
@@ -198,19 +198,3 @@ def test_ismissing_8a(self):
198 198
     def test_ismissing_9a(self):
199 199
         "afunc.ismissing_9a"
200 200
         assert_equal(ismissing(np.array([True])), np.array([False])) 
201  
-
202  
-# Unit tests ----------------------------------------------------------------        
203  
-    
204  
-def suite():
205  
-
206  
-    unit = unittest.TestLoader().loadTestsFromTestCase
207  
-    s = []
208  
-    s.append(unit(Test_nans)) 
209  
-    s.append(unit(Test_missing_marker))
210  
-    s.append(unit(Test_ismissing))             
211  
-    return unittest.TestSuite(s)
212  
-
213  
-def run():   
214  
-    suite = testsuite()
215  
-    unittest.TextTestRunner(verbosity=2).run(suite)
216  
-
14  la/util/tests/misc_test.py
@@ -38,17 +38,3 @@ def test_isa():
38 38
         yield assert_equal, isfloat(key), value[1], msg
39 39
         msg = '\nisscalar(' + str(key) + ')'
40 40
         yield assert_equal, isscalar(key), (value[0] or value[1]), msg
41  
-                        
42  
-def suite():
43  
-    s = []
44  
-    u = unittest.TestLoader().loadTestsFromTestCase
45  
-    s.append(u(Test_misc))
46  
-    return unittest.TestSuite(s)
47  
-
48  
-def run():   
49  
-    suite = suite()
50  
-    unittest.TextTestRunner(verbosity=2).run(suite)
51  
-    
52  
-if __name__ == '__main__':
53  
-    run()           
54  
-

0 notes on commit 67cc43b

Please sign in to comment.
Something went wrong with that request. Please try again.