Permalink
Browse files

TST Remove python unittest boilerplate...

...since nose is used
  • Loading branch information...
1 parent 919e15e commit 67cc43be2c06161a3568cddf039d4b57935d9b1f @kwgoodman committed Mar 19, 2013
Showing with 2 additions and 68 deletions.
  1. +2 −2 README.rst
  2. +0 −23 la/tests/deflarry_test.py
  3. +0 −13 la/tests/io_test.py
  4. +0 −16 la/tests/missing_test.py
  5. +0 −14 la/util/tests/misc_test.py
View
4 README.rst
@@ -122,9 +122,9 @@ After you have installed ``la``, run the suite of unit tests::
>>> import la
>>> la.test()
<snip>
- Ran 2997 tests in 9.225s
+ Ran 2996 tests in 9.225s
OK
- <nose.result.TextTestResult run=2997 errors=0 failures=0>
+ <nose.result.TextTestResult run=2996 errors=0 failures=0>
The ``la`` package contains C extensions that speed up common alignment
operations such as adding two unaligned larrys. If the C extensions don't
View
23 la/tests/deflarry_test.py
@@ -3529,29 +3529,6 @@ def test_vacuum8(self):
assert_almost_equal(larv.x, larr.x)
assert_(larv.label == larr.label)
-
-def suite():
- s = []
- u = unittest.TestLoader().loadTestsFromTestCase
- s.append(u(Test_init))
- s.append(u(Test_unary))
- s.append(u(Test_binary))
- s.append(u(Test_reduce))
- s.append(u(Test_comparison))
- s.append(u(Test_anyall))
- s.append(u(Test_getset))
- s.append(u(Test_label))
- s.append(u(Test_calc))
- s.append(u(Test_alignment))
- s.append(u(Test_properties_01))
- return unittest.TestSuite(s)
-
-def run():
- unittest.TextTestRunner(verbosity=2).run(suite())
-
-if __name__ == '__main__':
- run()
-
# take test -----------------------------------------------------------------
# Make sure larry.take gives the same result as larry.__getitem__.
View
13 la/tests/io_test.py
@@ -95,19 +95,6 @@ def test_io_6(self):
actual = io['desired'][:]
assert_larry_equal(actual, desired)
-def testsuite():
- s = []
- u = unittest.TestLoader().loadTestsFromTestCase
- s.append(u(Test_io))
- return unittest.TestSuite(s)
-
-def run():
- suite = testsuite()
- unittest.TextTestRunner(verbosity=2).run(suite)
-
-if __name__ == '__main__':
- run()
-
# nose tests ----------------------------------------------------------------
def datetime_test():
View
16 la/tests/missing_test.py
@@ -198,19 +198,3 @@ def test_ismissing_8a(self):
def test_ismissing_9a(self):
"afunc.ismissing_9a"
assert_equal(ismissing(np.array([True])), np.array([False]))
-
-# Unit tests ----------------------------------------------------------------
-
-def suite():
-
- unit = unittest.TestLoader().loadTestsFromTestCase
- s = []
- s.append(unit(Test_nans))
- s.append(unit(Test_missing_marker))
- s.append(unit(Test_ismissing))
- return unittest.TestSuite(s)
-
-def run():
- suite = testsuite()
- unittest.TextTestRunner(verbosity=2).run(suite)
-
View
14 la/util/tests/misc_test.py
@@ -38,17 +38,3 @@ def test_isa():
yield assert_equal, isfloat(key), value[1], msg
msg = '\nisscalar(' + str(key) + ')'
yield assert_equal, isscalar(key), (value[0] or value[1]), msg
-
-def suite():
- s = []
- u = unittest.TestLoader().loadTestsFromTestCase
- s.append(u(Test_misc))
- return unittest.TestSuite(s)
-
-def run():
- suite = suite()
- unittest.TextTestRunner(verbosity=2).run(suite)
-
-if __name__ == '__main__':
- run()
-

0 comments on commit 67cc43b

Please sign in to comment.