summaryrefslogtreecommitdiff
path: root/pym
diff options
context:
space:
mode:
authorW. Trevor King <wking@tremily.us>2012-11-11 22:13:12 -0500
committerW. Trevor King <wking@tremily.us>2012-11-11 22:22:30 -0500
commitd8966c9a08c3b18abf1f9811644626862faab523 (patch)
tree5d1b995533990412085f9ecac727733f414a5cb5 /pym
parenta58955f2429e83d1f290571ced555275993eecdb (diff)
downloadgentoolkit-d8966c9a08c3b18abf1f9811644626862faab523.tar.gz
eclean/test_search: fix test_main and mark so nosetests will ignore it
Diffstat (limited to 'pym')
-rwxr-xr-x[-rw-r--r--]pym/gentoolkit/test/eclean/test_search.py20
1 files changed, 7 insertions, 13 deletions
diff --git a/pym/gentoolkit/test/eclean/test_search.py b/pym/gentoolkit/test/eclean/test_search.py
index 7980161..7e27f9e 100644..100755
--- 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__':