From: W. Trevor King Date: Mon, 12 Nov 2012 03:02:10 +0000 (-0500) Subject: test_syntax: fix test_main and mark so nosetests will ignore it X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4f3ca38bace8245773855e944ecb204ecdb6f9bc;p=gentoolkit.git test_syntax: fix test_main and mark so nosetests will ignore it * fix TestGentoolkitHelpers2 -> TestForSyntaxErrors * use unittest.TestLoader and TextTestRunner instead of test.test_support From the Python documentation [1]: The test package is meant for internal use by Python only. It is documented for the benefit of the core developers of Python. Any use of this package outside of Python's standard library is discouraged as code mentioned here can change or be removed without notice between releases of Python. [1]: http://docs.python.org/2/library/test.html --- diff --git a/pym/gentoolkit/test/test_syntax.py b/pym/gentoolkit/test/test_syntax.py index 325034a..7a990ca 100644 --- a/pym/gentoolkit/test/test_syntax.py +++ b/pym/gentoolkit/test/test_syntax.py @@ -27,7 +27,10 @@ class TestForSyntaxErrors(unittest.TestCase): def test_main(): - test_support.run_unittest(TestGentoolkitHelpers2) + suite = unittest.TestLoader().loadTestsFromTestCase( + TestForSyntaxErrors) + unittest.TextTestRunner(verbosity=2).run(suite) +test_main.__test__ = False if __name__ == '__main__':