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

index c020be1cf92e17a6db9ad5d00c474c2932fee989..1513b5b5118497921a75136881fd8018c108e1d7 100644 (file)
@@ -1,10 +1,6 @@
 import unittest
 import warnings
 from tempfile import NamedTemporaryFile, mktemp
-try:
-       from test import test_support
-except ImportError:
-       from test import support as test_support
 
 from gentoolkit import query
 from gentoolkit import errors
@@ -102,7 +98,9 @@ class TestQuery(unittest.TestCase):
 
 
 def test_main():
-       test_support.run_unittest(TestGentoolkitHelpers2)
+       suite = unittest.TestLoader().loadTestsFromTestCase(TestQuery)
+       unittest.TextTestRunner(verbosity=2).run(suite)
+test_main.__test__ = False
 
 
 if __name__ == '__main__':