From d8966c9a08c3b18abf1f9811644626862faab523 Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Sun, 11 Nov 2012 22:13:12 -0500 Subject: [PATCH] eclean/test_search: fix test_main and mark so nosetests will ignore it --- pym/gentoolkit/test/eclean/test_search.py | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) mode change 100644 => 100755 pym/gentoolkit/test/eclean/test_search.py 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__': -- 2.26.2