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

index 520b97d99e199e50f172aaf3443a63a06ca265c0..22db564ec9400c208fff883ee291d98f968e5722 100644 (file)
@@ -1,8 +1,4 @@
 import unittest
-try:
-       from test import test_support
-except ImportError:
-       from test import support as test_support
 
 from gentoolkit import equery
 
@@ -44,7 +40,9 @@ class TestEqueryInit(unittest.TestCase):
 
 
 def test_main():
-       test_support.run_unittest(TestEqueryInit)
+       suite = unittest.TestLoader().loadTestsFromTestCase(TestEqueryInit)
+       unittest.TextTestRunner(verbosity=2).run(suite)
+test_main.__test__ = False
 
 
 if __name__ == '__main__':