diff --git a/README.rst b/README.rst index a9f72af..1285eaf 100644 --- a/README.rst +++ b/README.rst @@ -122,9 +122,9 @@ After you have installed ``la``, run the suite of unit tests:: >>> import la >>> la.test() - Ran 2997 tests in 9.225s + Ran 2996 tests in 9.225s OK - + The ``la`` package contains C extensions that speed up common alignment operations such as adding two unaligned larrys. If the C extensions don't diff --git a/la/tests/deflarry_test.py b/la/tests/deflarry_test.py index 4476957..66eca2d 100644 --- a/la/tests/deflarry_test.py +++ b/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__. diff --git a/la/tests/io_test.py b/la/tests/io_test.py index b5dc3b7..ec25634 100644 --- a/la/tests/io_test.py +++ b/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(): diff --git a/la/tests/missing_test.py b/la/tests/missing_test.py index 48be599..d59ba8a 100644 --- a/la/tests/missing_test.py +++ b/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) - diff --git a/la/util/tests/misc_test.py b/la/util/tests/misc_test.py index e7e7e57..039f6b5 100644 --- a/la/util/tests/misc_test.py +++ b/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() -