test_keyword: fix test_main and mark so nosetests will ignore it
authorW. Trevor King <wking@tremily.us>
Mon, 12 Nov 2012 03:07:27 +0000 (22:07 -0500)
committerW. Trevor King <wking@tremily.us>
Mon, 12 Nov 2012 03:22:26 +0000 (22:22 -0500)
pym/gentoolkit/test/test_keyword.py

index 3e72e5f67a4e54654e274056ff8ee9d38bb244dc..9add43aadf7550e2a7beb63c238eec4c211729d4 100644 (file)
@@ -2,10 +2,6 @@ import sys
 import unittest
 import warnings
 from tempfile import NamedTemporaryFile
-try:
-       from test import test_support
-except ImportError:
-       from test import support as test_support
 
 from gentoolkit import keyword
 from gentoolkit.test import cmp
@@ -50,7 +46,10 @@ class TestGentoolkitKeyword(unittest.TestCase):
 
 
 def test_main():
-       test_support.run_unittest(TestGentoolkitHelpers2)
+       suite = unittest.TestLoader().loadTestsFromTestCase(
+               TestGentoolkitKeyword)
+       unittest.TextTestRunner(verbosity=2).run(suite)
+test_main.__test__ = False
 
 
 if __name__ == '__main__':