From: W. Trevor King Date: Mon, 12 Nov 2012 03:13:12 +0000 (-0500) Subject: eclean/test_search: fix test_main and mark so nosetests will ignore it X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d8966c9a08c3b18abf1f9811644626862faab523;p=gentoolkit.git eclean/test_search: fix test_main and mark so nosetests will ignore it --- diff --git a/pym/gentoolkit/test/eclean/test_search.py b/pym/gentoolkit/test/eclean/test_search.py old mode 100644 new mode 100755 index 7980161..7e27f9e --- a/pym/gentoolkit/test/eclean/test_search.py +++ b/pym/gentoolkit/test/eclean/test_search.py @@ -16,11 +16,6 @@ from tempfile import NamedTemporaryFile, mkdtemp import unittest import re -try: - from test import test_support -except ImportError: - from test import support as test_support - from gentoolkit.test.eclean.distsupport import * import gentoolkit.eclean.search as search from gentoolkit.eclean.search import DistfilesSearch @@ -618,14 +613,13 @@ class TestRemoveProtected(unittest.TestCase): def test_main(): - - # Run tests - test_support.run_unittest(TestCheckLimits('test_check_limits')) - test_support.run_unittest( TestFetchRestricted('test__fetch_restricted')) - test_support.run_unittest( TestFetchRestricted('test_unrestricted')) - test_support.run_unittest( TestNonDestructive('test_non_destructive')) - test_support.run_unittest( TestNonDestructive('test_destructive')) - test_support.run_unittest( TestRemoveProtected('test_remove_protected')) + suite = unittest.TestLoader() + suite.loadTestsFromTestCase(TestCheckLimits) + suite.loadTestsFromTestCase(TestFetchRestricted) + suite.loadTestsFromTestCase(TestNonDestructive) + suite.loadTestsFromTestCase(TestRemoveProtected) + unittest.TextTestRunner(verbosity=2).run(suite) +test_main.__test__ = False if __name__ == '__main__':