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

index b4985454dba2d5b0096a717c7e01b70c90445c81..abafce3808123fe145bda590abc75ad55f4cb123 100644 (file)
@@ -6,10 +6,6 @@
 # $Header$
 
 import unittest
-try:
-       from test import test_support
-except ImportError:
-       from test import support as test_support
 
 from gentoolkit.atom import *
 from gentoolkit.test import cmp
@@ -147,7 +143,10 @@ class TestGentoolkitAtom(unittest.TestCase):
 
 
 def test_main():
-       test_support.run_unittest(TestGentoolkitAtom)
+        suite = unittest.TestLoader().loadTestsFromTestCase(TestGentoolkitAtom)
+        unittest.TextTestRunner(verbosity=2).run(suite)
+test_main.__test__ = False
+
 
 if __name__ == '__main__':
        test_main()